Classes
Interfaces
Members
number
# static constant DEFAULT_TIMEOUT
The default timebounds, in seconds, during which a transaction will be valid. This is attached to the transaction before transaction simulation (it is needed for simulation to succeed). It is also re-calculated and re-added before transaction signing.
- Default Value:
- 300
string
# static constant NULL_ACCOUNT
An impossible account on the Stellar network
- Default Value:
- GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF
Methods
# static basicNodeSigner(keypair, networkPassphrase)
For use with Client and module:contract.AssembledTransaction.
Implements signTransaction and signAuthEntry with signatures expected by
those classes. This is useful for testing and maybe some simple Node
applications. Feel free to use this as a starting point for your own
Wallet/TransactionSigner implementation.
Parameters:
Type Definitions
object
# ClientOptions
Options for a smart contract client.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
publicKey |
string
|
<optional> |
The public key of the source account for this transaction. You can, override this for specific methods later; see MethodOptions. |
signTransaction |
SignTransaction
|
<optional> |
A function to sign the transaction using the private key corresponding to,
the given |
signAuthEntry |
SignAuthEntry
|
<optional> |
A function to sign a specific auth entry for a transaction, using the,
private key corresponding to the provided |
contractId |
string
|
The address of the contract the client will interact with. |
|
networkPassphrase |
string
|
The network passphrase for the Stellar network this contract is deployed, to. |
|
rpcUrl |
string
|
The URL of the RPC instance that will be used to interact with this, contract. |
|
allowHttp |
boolean
|
<optional> |
If true, will allow HTTP requests to the RPC. If false, will, only allow HTTPS requests. |
headers |
Record.<string, string>
|
<optional> |
Optional headers to include in requests to the RPC. |
errorTypes |
Record.<number, object>
|
<optional> |
This gets filled in automatically from the ContractSpec when you,
instantiate a Client.,
,
Background: If the contract you're calling uses the |
server |
Server
|
<optional> |
The Server instance to use for RPC calls. If not provided, one will be,
created automatically from |
object
# MethodOptions
Options for a smart contract method invocation.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
fee |
string
|
<optional> |
The fee to pay for the transaction. |
timeoutInSeconds |
number
|
<optional> |
The timebounds which should be set for transactions generated by this, contract client. :contract#.DEFAULT_TIMEOUT |
simulate |
boolean
|
<optional> |
Whether to automatically simulate the transaction when constructing the, AssembledTransaction. |
restore |
boolean
|
<optional> |
If true, will automatically attempt to restore the transaction if there, are archived entries that need renewal. |
publicKey |
string
|
<optional> |
The public key of the source account for this transaction., , Default: the one provided to the Client in ClientOptions |
signTransaction |
SignTransaction
|
<optional> |
A function to sign the transaction using the private key corresponding to,
the given |
signAuthEntry |
SignAuthEntry
|
<optional> |
A function to sign a specific auth entry for a transaction, using the,
private key corresponding to the provided |