Namespace: helpers
Classes
Interfaces
- AutoWaitConfig
- ChainInfo
- ContractReceipt
- ContractTransaction
- Interval
- MultiEventTransactionReceipt
- ReadConfig
- Signal
- SignerConfig
- Wait
Type Aliases
ChainName
Ƭ ChainName: keyof TablelandNetworkConfig
The set of supported chain names as used by the Tableland network.
Defined in
@tableland/sdk/src/helpers/chains.ts:10
Config
Ƭ Config: Partial
<ReadConfig
& SignerConfig
>
Defined in
@tableland/sdk/src/helpers/config.ts:17
ExternalProvider
Ƭ ExternalProvider: providers.ExternalProvider
Defined in
@tableland/sdk/src/helpers/ethers.ts:11
NormalizedStatement
Ƭ NormalizedStatement: sqlparser.NormalizedStatement
Defined in
@tableland/sqlparser/types.d.ts:34
RegistryReceipt
Ƭ RegistryReceipt: Required
<Omit
<TransactionReceipt
, "error"
| "errorEventIdx"
>>
RegistryReceipt is based on the TransactionReceipt type which defined by the API spec. The API v1 has a known problem where it only returns the first tableId from a transaction.
Defined in
@tableland/sdk/src/helpers/ethers.ts:46
SignalAndInterval
Ƭ SignalAndInterval: Signal
& Interval
Defined in
@tableland/sdk/src/helpers/await.ts:11
StatementType
Ƭ StatementType: sqlparser.StatementType
Defined in
@tableland/sqlparser/types.d.ts:36
Variables
supportedChains
• Const
supportedChains: Record
<keyof TablelandNetworkConfig
, ChainInfo
>
The set of chains and their information as supported by the Tableland network.
Defined in
@tableland/sdk/src/helpers/chains.ts:44
Functions
checkWait
▸ checkWait(config
, receipt
): Promise
<WaitableTransactionReceipt
>
Parameters
Name | Type |
---|---|
config | Partial <ReadConfig & SignerConfig > & Partial <AutoWaitConfig > |
receipt | WaitableTransactionReceipt |
Returns
Promise
<WaitableTransactionReceipt
>
Defined in
@tableland/sdk/src/helpers/config.ts:19
extractBaseUrl
▸ extractBaseUrl(conn?
, chainNameOrId?
): Promise
<string
>
Parameters
Name | Type |
---|---|
conn | Partial <ReadConfig & SignerConfig > |
chainNameOrId? | number | keyof TablelandNetworkConfig |
Returns
Promise
<string
>
Defined in
@tableland/sdk/src/helpers/config.ts:30
extractChainId
▸ extractChainId(conn?
): Promise
<number
>
Parameters
Name | Type |
---|---|
conn | Partial <ReadConfig & SignerConfig > |
Returns
Promise
<number
>
Defined in
@tableland/sdk/src/helpers/config.ts:59
extractSigner
▸ extractSigner(conn?
, external?
): Promise
<Signer
>
Parameters
Name | Type |
---|---|
conn | Partial <ReadConfig & SignerConfig > |
external? | ExternalProvider |
Returns
Promise
<Signer
>
Defined in
@tableland/sdk/src/helpers/config.ts:49
getBaseUrl
▸ getBaseUrl(chainNameOrId
): string
Get the default host uri for a given chain name.
Parameters
Name | Type | Description |
---|---|---|
chainNameOrId | number | keyof TablelandNetworkConfig | The requested chain name. |
Returns
string
A string representing the default host uri for a given chain.
Defined in
@tableland/sdk/src/helpers/chains.ts:107
getChainId
▸ getChainId(chainNameOrId
): number
Get the default chain id for a given chain name.
Parameters
Name | Type | Description |
---|---|---|
chainNameOrId | number | keyof TablelandNetworkConfig | The requested chain name. |
Returns
number
A number representing the default chain id of the requested chain.
Defined in
@tableland/sdk/src/helpers/chains.ts:98
getChainInfo
▸ getChainInfo(chainNameOrId
): ChainInfo
Get the default chain information for a given chain name.
Parameters
Name | Type | Description |
---|---|---|
chainNameOrId | number | keyof TablelandNetworkConfig | The requested chain name. |
Returns
An object containing the default chainId, contractAddress, chainName, and baseUrl for the given chain.
Defined in
@tableland/sdk/src/helpers/chains.ts:59
getContractAddress
▸ getContractAddress(chainNameOrId
): string
Get the default contract address for a given chain name.
Parameters
Name | Type | Description |
---|---|---|
chainNameOrId | number | keyof TablelandNetworkConfig | The requested chain name. |
Returns
string
A hex string representing the default address for the Tableland registry contract.
Defined in
@tableland/sdk/src/helpers/chains.ts:89
getDefaultProvider
▸ getDefaultProvider(network?
, options?
): BaseProvider
Parameters
Name | Type |
---|---|
network? | Networkish |
options? | any |
Returns
BaseProvider
Defined in
@ethersproject/providers/lib/index.d.ts:21
getSigner
▸ getSigner(external?
): Promise
<Signer
>
Request a signer object from the global ethereum object.
Throws
If no global ethereum object is available.
Parameters
Name | Type | Description |
---|---|---|
external? | ExternalProvider | A valid external provider. Defaults to globalThis.ethereum if not provided. |
Returns
Promise
<Signer
>
A promise that resolves to a valid web3 provider/signer
Defined in
@tableland/sdk/src/helpers/ethers.ts:108
isTestnet
▸ isTestnet(chainNameOrId
): boolean
Parameters
Name | Type |
---|---|
chainNameOrId | number | keyof TablelandNetworkConfig |
Returns
boolean
Defined in
@tableland/sdk/src/helpers/chains.ts:73
normalize
▸ normalize(sql
): Promise
<NormalizedStatement
>
Parameters
Name | Type |
---|---|
sql | string |
Returns
Promise
<NormalizedStatement
>
Defined in
@tableland/sdk/src/helpers/parser.ts:12
overrideDefaults
▸ overrideDefaults(chainNameOrId
, values
): void
Override the internal list of registry addresses and validator urls that will be used for Contract calls and read queries
Parameters
Name | Type | Description |
---|---|---|
chainNameOrId | number | keyof TablelandNetworkConfig | Either the chain name or chainId. For a list of chain names see the evm-tableland networks file |
values | Record <keyof ChainInfo , string | number > | The values you would like to use to override the defaults. Example: {contractAddress: "0x000deadbeef", baseUrl: "https://my.validator.mydomain.tld"} |
Returns
void
void
Defined in
@tableland/sdk/src/helpers/chains.ts:120
validateTableName
▸ validateTableName(tableName
, isCreate?
): Promise
<ValidatedTable
>
Parameters
Name | Type | Default value |
---|---|---|
tableName | string | undefined |
isCreate | boolean | false |
Returns
Promise
<ValidatedTable
>
Defined in
@tableland/sdk/src/helpers/parser.ts:23