40 lines
1.7 KiB
TypeScript
40 lines
1.7 KiB
TypeScript
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from '@stellar/stellar-sdk/contract';
|
|
import type { u32 } from '@stellar/stellar-sdk/contract';
|
|
export * from '@stellar/stellar-sdk';
|
|
export * as contract from '@stellar/stellar-sdk/contract';
|
|
export * as rpc from '@stellar/stellar-sdk/rpc';
|
|
export declare const networks: {
|
|
readonly testnet: {
|
|
readonly networkPassphrase: "Test SDF Network ; September 2015";
|
|
readonly contractId: "CDM2IJCM3KAZBEM2SC3VKJ7PZTFKXQXFEEKAODQZVONDRHC3U6HEAWKZ";
|
|
};
|
|
};
|
|
export declare const Errors: {};
|
|
export interface Client {
|
|
/**
|
|
* Construct and simulate a increment transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
* Increment an internal counter; return the new value.
|
|
*/
|
|
increment: (options?: {
|
|
/**
|
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
*/
|
|
fee?: number;
|
|
/**
|
|
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
*/
|
|
timeoutInSeconds?: number;
|
|
/**
|
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
*/
|
|
simulate?: boolean;
|
|
}) => Promise<AssembledTransaction<u32>>;
|
|
}
|
|
export declare class Client extends ContractClient {
|
|
readonly options: ContractClientOptions;
|
|
constructor(options: ContractClientOptions);
|
|
readonly fromJSON: {
|
|
increment: (json: string) => AssembledTransaction<number>;
|
|
};
|
|
}
|