diff --git a/build.sh b/build.sh index 8313342..9123e9d 100755 --- a/build.sh +++ b/build.sh @@ -2,5 +2,5 @@ echo "Creating build" npm run build -echo "Creating doc" -npx typedoc --out doc src/index.ts +echo "Creating docs" +npx typedoc --cname sdk-docs.supra.com --out docs src/index.ts diff --git a/doc/.nojekyll b/docs/.nojekyll similarity index 100% rename from doc/.nojekyll rename to docs/.nojekyll diff --git a/doc/assets/highlight.css b/docs/assets/highlight.css similarity index 100% rename from doc/assets/highlight.css rename to docs/assets/highlight.css diff --git a/doc/assets/icons.js b/docs/assets/icons.js similarity index 100% rename from doc/assets/icons.js rename to docs/assets/icons.js diff --git a/doc/assets/icons.svg b/docs/assets/icons.svg similarity index 100% rename from doc/assets/icons.svg rename to docs/assets/icons.svg diff --git a/doc/assets/main.js b/docs/assets/main.js similarity index 100% rename from doc/assets/main.js rename to docs/assets/main.js diff --git a/doc/assets/navigation.js b/docs/assets/navigation.js similarity index 100% rename from doc/assets/navigation.js rename to docs/assets/navigation.js diff --git a/doc/assets/search.js b/docs/assets/search.js similarity index 100% rename from doc/assets/search.js rename to docs/assets/search.js diff --git a/doc/assets/style.css b/docs/assets/style.css similarity index 100% rename from doc/assets/style.css rename to docs/assets/style.css diff --git a/doc/classes/SupraClient.html b/docs/classes/SupraClient.html similarity index 96% rename from doc/classes/SupraClient.html rename to docs/classes/SupraClient.html index da6f3f4..d668eb8 100644 --- a/doc/classes/SupraClient.html +++ b/docs/classes/SupraClient.html @@ -1,5 +1,5 @@ SupraClient | supra-l1-sdk

Class SupraClient

Provides methods for interacting with supra rpc node.

-

Constructors

Constructors

Properties

chainId: ChainId
delayBetweenPoolingRequest: number = 1000
maxRetryForTransactionCompletion: number = 300
supraNodeURL: string

Methods

  • Airdrop test Supra token on given account

    +

Constructors

Properties

chainId: ChainId
delayBetweenPoolingRequest: number = 1000
maxRetryForTransactionCompletion: number = 300
supraNodeURL: string

Methods

  • Get Coin balance of given account

    +
  • Get Coin balance of given account

    Parameters

    • account: HexString

      Supra account address for getting balance

    • coinType: string

      Type of a coin resource

    Returns Promise<bigint>

    Supra Balance

    -
  • Get transactions sent by the account and Coin transfer related transactions

    +
  • Get transactions sent by the account and Coin transfer related transactions

    Parameters

    • account: HexString

      Supra account address

    • count: number = 15

      Number of coin transfer transactions and account sent transaction to be considered, For instance if the value is N so total N*2 transactions will be returned.

    Returns Promise<TransactionDetail[]>

    List of TransactionDetail

    -
  • Get info of given supra account

    Parameters

    • account: HexString

      Hex-encoded 32 byte Supra account address

    Returns Promise<AccountInfo>

    AccountInfo

    -
  • Get list of all resources held by given supra account

    Parameters

    • account: HexString

      Hex-encoded 32 byte Supra account address

    Returns Promise<AccountResources>

    AccountResources

    -
  • Get Supra balance of given account

    +
  • Get Supra balance of given account

    Parameters

    • account: HexString

      Supra Account address for getting balance

    Returns Promise<bigint>

    Supra Balance

    -
  • Get transactions sent by the account

    Parameters

    • account: HexString

      Supra account address

    • count: number = 15

      Number of transactions details

    • start: null | number = null

      Cursor for pagination based response

    Returns Promise<TransactionDetail[]>

    List of TransactionDetail

    -
  • Get Chain Id Of Supra Network

    +
  • Get Chain Id Of Supra Network

    Returns Promise<ChainId>

    Chain Id of network

    -
  • Get Supra balance of given account

    +
  • Get Supra balance of given account

    Parameters

    • coinType: string

      Type of a coin resource

    Returns Promise<CoinInfo>

    CoinInfo

    -
  • Get Coin Transfer related transactions associated with the account

    +
  • Get Coin Transfer related transactions associated with the account

    Parameters

    • account: HexString

      Supra account address

    • count: number = 15

      Number of transactions details

    • start: null | number = null

      Cursor for pagination based response

    Returns Promise<TransactionDetail[]>

    List of TransactionDetail

    -
  • Get current mean_gas_price

    +
  • Get current mean_gas_price

    Returns Promise<bigint>

    Current mean_gas_price

    -
  • Get data of resource held by given supra account

    +
  • Get data of resource held by given supra account

    Parameters

    • account: HexString

      Hex-encoded 32 byte Supra account address

    • resourceType: string

      Type of a resource

    Returns Promise<any>

    Resource data

    -
  • Get transaction details of given transaction hash

    +
  • Get transaction details of given transaction hash

    Parameters

    • account: HexString

      Hex-encoded 32 byte Supra account address

    • transactionHash: string

      Hex-encoded 32 byte transaction hash for getting transaction details

    Returns Promise<null | TransactionDetail>

    TransactionDetail

    -
  • Get status of given supra transaction

    Parameters

    • transactionHash: string

      Hex-encoded 32 byte transaction hash for getting transaction status

    Returns Promise<null | TransactionStatus>

    TransactionStatus

    -
  • Check whether given account exists onchain or not

    +
  • Check whether given account exists onchain or not

    Parameters

    • account: HexString

      Hex-encoded 32 byte Supra account address

    Returns Promise<boolean>

    true if account exists otherwise false

    -
  • Publish package or module on supra network

    +
  • Publish package or module on supra network

    Parameters

    • senderAccount: AptosAccount

      Module Publisher KeyPair

    • packageMetadata: Uint8Array

      Package Metadata

    • modulesCode: Uint8Array[]

      module code

    Returns Promise<TransactionResponse>

    TransactionResponse

    -
  • Parameters

    • isGetMethod: boolean
    • subURL: string
    • Optional data: any

    Returns Promise<AxiosResponse<any, any>>

  • Send entry_function_payload type tx using serialized raw transaction datas

    +
  • Parameters

    • isGetMethod: boolean
    • subURL: string
    • Optional data: any

    Returns Promise<AxiosResponse<any, any>>

  • Send entry_function_payload type tx using serialized raw transaction datas

    Parameters

    • senderAccount: AptosAccount

      Sender KeyPair

    • serializedRawTransaction: Uint8Array

      Serialized raw transaction data

    Returns Promise<TransactionResponse>

    TransactionResponse

    -
  • Parameters

    • senderAccount: AptosAccount
    • rawTxn: RawTransaction

    Returns string

  • Simulate a transaction using the provided transaction payload

    +
  • Parameters

    • senderAccount: AptosAccount
    • rawTxn: RawTransaction

    Returns string

  • Simulate a transaction using the provided transaction payload

    Parameters

    Returns Promise<void>

  • Transfer coin

    +

Returns Promise<void>

\ No newline at end of file +
\ No newline at end of file diff --git a/doc/enums/TransactionStatus.html b/docs/enums/TransactionStatus.html similarity index 95% rename from doc/enums/TransactionStatus.html rename to docs/enums/TransactionStatus.html index ad21571..415f349 100644 --- a/doc/enums/TransactionStatus.html +++ b/docs/enums/TransactionStatus.html @@ -1,4 +1,4 @@ -TransactionStatus | supra-l1-sdk

Enumeration TransactionStatus

Enumeration Members

Failed +TransactionStatus | supra-l1-sdk

Enumeration TransactionStatus

Enumeration Members

Enumeration Members

Failed: "Failed"
Pending: "Pending"
Success: "Success"
\ No newline at end of file +

Enumeration Members

Failed: "Failed"
Pending: "Pending"
Success: "Success"
\ No newline at end of file diff --git a/doc/enums/TxTypeForTransactionInsights.html b/docs/enums/TxTypeForTransactionInsights.html similarity index 95% rename from doc/enums/TxTypeForTransactionInsights.html rename to docs/enums/TxTypeForTransactionInsights.html index c6d74c3..c53eaae 100644 --- a/doc/enums/TxTypeForTransactionInsights.html +++ b/docs/enums/TxTypeForTransactionInsights.html @@ -1,4 +1,4 @@ -TxTypeForTransactionInsights | supra-l1-sdk

Enumeration TxTypeForTransactionInsights

Enumeration Members

CoinTransfer +TxTypeForTransactionInsights | supra-l1-sdk

Enumeration TxTypeForTransactionInsights

Enumeration Members

CoinTransfer: "CoinTransfer"
EntryFunctionCall: "EntryFunctionCall"
ScriptCall: "ScriptCall"
\ No newline at end of file +

Enumeration Members

CoinTransfer: "CoinTransfer"
EntryFunctionCall: "EntryFunctionCall"
ScriptCall: "ScriptCall"
\ No newline at end of file diff --git a/doc/index.html b/docs/index.html similarity index 100% rename from doc/index.html rename to docs/index.html diff --git a/doc/interfaces/AccountInfo.html b/docs/interfaces/AccountInfo.html similarity index 95% rename from doc/interfaces/AccountInfo.html rename to docs/interfaces/AccountInfo.html index eea7256..889b264 100644 --- a/doc/interfaces/AccountInfo.html +++ b/docs/interfaces/AccountInfo.html @@ -1,3 +1,3 @@ -AccountInfo | supra-l1-sdk

Interface AccountInfo

interface AccountInfo {
    authentication_key: string;
    sequence_number: bigint;
}

Properties

authentication_key +AccountInfo | supra-l1-sdk

Interface AccountInfo

interface AccountInfo {
    authentication_key: string;
    sequence_number: bigint;
}

Properties

authentication_key: string
sequence_number: bigint
\ No newline at end of file +

Properties

authentication_key: string
sequence_number: bigint
\ No newline at end of file diff --git a/doc/interfaces/AccountResources.html b/docs/interfaces/AccountResources.html similarity index 98% rename from doc/interfaces/AccountResources.html rename to docs/interfaces/AccountResources.html index 4930f7a..9ad357a 100644 --- a/doc/interfaces/AccountResources.html +++ b/docs/interfaces/AccountResources.html @@ -1,3 +1,3 @@ -AccountResources | supra-l1-sdk

Interface AccountResources

interface AccountResources {
    module: [string, {
        address: string;
        name: string;
    }][];
    struct_type: [string, {
        address: string;
        module: string;
        name: string;
        type_args: StructTag[];
    }][];
}

Properties

module +AccountResources | supra-l1-sdk

Interface AccountResources

interface AccountResources {
    module: [string, {
        address: string;
        name: string;
    }][];
    struct_type: [string, {
        address: string;
        module: string;
        name: string;
        type_args: StructTag[];
    }][];
}

Properties

Properties

module: [string, {
    address: string;
    name: string;
}][]
struct_type: [string, {
    address: string;
    module: string;
    name: string;
    type_args: StructTag[];
}][]
\ No newline at end of file +

Properties

module: [string, {
    address: string;
    name: string;
}][]
struct_type: [string, {
    address: string;
    module: string;
    name: string;
    type_args: StructTag[];
}][]
\ No newline at end of file diff --git a/doc/interfaces/CoinChange.html b/docs/interfaces/CoinChange.html similarity index 96% rename from doc/interfaces/CoinChange.html rename to docs/interfaces/CoinChange.html index 7e14d0b..dc9fa77 100644 --- a/doc/interfaces/CoinChange.html +++ b/docs/interfaces/CoinChange.html @@ -1,3 +1,3 @@ -CoinChange | supra-l1-sdk

Interface CoinChange

interface CoinChange {
    amount: bigint;
    coinType: string;
}

Properties

amount +CoinChange | supra-l1-sdk

Interface CoinChange

interface CoinChange {
    amount: bigint;
    coinType: string;
}

Properties

Properties

amount: bigint
coinType: string
\ No newline at end of file +

Properties

amount: bigint
coinType: string
\ No newline at end of file diff --git a/doc/interfaces/CoinInfo.html b/docs/interfaces/CoinInfo.html similarity index 96% rename from doc/interfaces/CoinInfo.html rename to docs/interfaces/CoinInfo.html index db011ad..97c8c79 100644 --- a/doc/interfaces/CoinInfo.html +++ b/docs/interfaces/CoinInfo.html @@ -1,4 +1,4 @@ -CoinInfo | supra-l1-sdk

Interface CoinInfo

interface CoinInfo {
    decimals: number;
    name: string;
    symbol: string;
}

Properties

decimals +CoinInfo | supra-l1-sdk

Interface CoinInfo

interface CoinInfo {
    decimals: number;
    name: string;
    symbol: string;
}

Properties

Properties

decimals: number
name: string
symbol: string
\ No newline at end of file +

Properties

decimals: number
name: string
symbol: string
\ No newline at end of file diff --git a/doc/interfaces/FaucetRequestResponse.html b/docs/interfaces/FaucetRequestResponse.html similarity index 96% rename from doc/interfaces/FaucetRequestResponse.html rename to docs/interfaces/FaucetRequestResponse.html index c7b5ea5..737aab0 100644 --- a/doc/interfaces/FaucetRequestResponse.html +++ b/docs/interfaces/FaucetRequestResponse.html @@ -1,3 +1,3 @@ -FaucetRequestResponse | supra-l1-sdk

Interface FaucetRequestResponse

interface FaucetRequestResponse {
    status: TransactionStatus;
    transactionHash: string;
}

Properties

status +FaucetRequestResponse | supra-l1-sdk

Interface FaucetRequestResponse

interface FaucetRequestResponse {
    status: TransactionStatus;
    transactionHash: string;
}

Properties

transactionHash: string
\ No newline at end of file +

Properties

transactionHash: string
\ No newline at end of file diff --git a/doc/interfaces/FunctionTypeArgs.html b/docs/interfaces/FunctionTypeArgs.html similarity index 98% rename from doc/interfaces/FunctionTypeArgs.html rename to docs/interfaces/FunctionTypeArgs.html index f09a241..0827098 100644 --- a/doc/interfaces/FunctionTypeArgs.html +++ b/docs/interfaces/FunctionTypeArgs.html @@ -1,2 +1,2 @@ -FunctionTypeArgs | supra-l1-sdk

Interface FunctionTypeArgs

interface FunctionTypeArgs {
    struct: {
        address: string;
        module: string;
        name: string;
        type_args: any[];
    };
}

Properties

Properties

struct: {
    address: string;
    module: string;
    name: string;
    type_args: any[];
}

Type declaration

  • address: string
  • module: string
  • name: string
  • type_args: any[]
\ No newline at end of file +FunctionTypeArgs | supra-l1-sdk

Interface FunctionTypeArgs

interface FunctionTypeArgs {
    struct: {
        address: string;
        module: string;
        name: string;
        type_args: any[];
    };
}

Properties

Properties

struct: {
    address: string;
    module: string;
    name: string;
    type_args: any[];
}

Type declaration

  • address: string
  • module: string
  • name: string
  • type_args: any[]
\ No newline at end of file diff --git a/doc/interfaces/SendTxPayload.html b/docs/interfaces/SendTxPayload.html similarity index 99% rename from doc/interfaces/SendTxPayload.html rename to docs/interfaces/SendTxPayload.html index 87865cb..e73d692 100644 --- a/doc/interfaces/SendTxPayload.html +++ b/docs/interfaces/SendTxPayload.html @@ -1,2 +1,2 @@ -SendTxPayload | supra-l1-sdk

Interface SendTxPayload

interface SendTxPayload {
    Move: {
        authenticator: {
            Ed25519: {
                public_key: string;
                signature: string;
            };
        };
        raw_txn: {
            chain_id: number;
            expiration_timestamp_secs: number;
            gas_unit_price: number;
            max_gas_amount: number;
            payload: {
                EntryFunction: {
                    args: number[][];
                    function: string;
                    module: {
                        address: string;
                        name: string;
                    };
                    ty_args: FunctionTypeArgs[];
                };
            };
            sender: string;
            sequence_number: number;
        };
    };
}

Properties

Properties

Move: {
    authenticator: {
        Ed25519: {
            public_key: string;
            signature: string;
        };
    };
    raw_txn: {
        chain_id: number;
        expiration_timestamp_secs: number;
        gas_unit_price: number;
        max_gas_amount: number;
        payload: {
            EntryFunction: {
                args: number[][];
                function: string;
                module: {
                    address: string;
                    name: string;
                };
                ty_args: FunctionTypeArgs[];
            };
        };
        sender: string;
        sequence_number: number;
    };
}

Type declaration

  • authenticator: {
        Ed25519: {
            public_key: string;
            signature: string;
        };
    }
    • Ed25519: {
          public_key: string;
          signature: string;
      }
      • public_key: string
      • signature: string
  • raw_txn: {
        chain_id: number;
        expiration_timestamp_secs: number;
        gas_unit_price: number;
        max_gas_amount: number;
        payload: {
            EntryFunction: {
                args: number[][];
                function: string;
                module: {
                    address: string;
                    name: string;
                };
                ty_args: FunctionTypeArgs[];
            };
        };
        sender: string;
        sequence_number: number;
    }
    • chain_id: number
    • expiration_timestamp_secs: number
    • gas_unit_price: number
    • max_gas_amount: number
    • payload: {
          EntryFunction: {
              args: number[][];
              function: string;
              module: {
                  address: string;
                  name: string;
              };
              ty_args: FunctionTypeArgs[];
          };
      }
      • EntryFunction: {
            args: number[][];
            function: string;
            module: {
                address: string;
                name: string;
            };
            ty_args: FunctionTypeArgs[];
        }
        • args: number[][]
        • function: string
        • module: {
              address: string;
              name: string;
          }
          • address: string
          • name: string
        • ty_args: FunctionTypeArgs[]
    • sender: string
    • sequence_number: number
\ No newline at end of file +SendTxPayload | supra-l1-sdk

Interface SendTxPayload

interface SendTxPayload {
    Move: {
        authenticator: {
            Ed25519: {
                public_key: string;
                signature: string;
            };
        };
        raw_txn: {
            chain_id: number;
            expiration_timestamp_secs: number;
            gas_unit_price: number;
            max_gas_amount: number;
            payload: {
                EntryFunction: {
                    args: number[][];
                    function: string;
                    module: {
                        address: string;
                        name: string;
                    };
                    ty_args: FunctionTypeArgs[];
                };
            };
            sender: string;
            sequence_number: number;
        };
    };
}

Properties

Properties

Move: {
    authenticator: {
        Ed25519: {
            public_key: string;
            signature: string;
        };
    };
    raw_txn: {
        chain_id: number;
        expiration_timestamp_secs: number;
        gas_unit_price: number;
        max_gas_amount: number;
        payload: {
            EntryFunction: {
                args: number[][];
                function: string;
                module: {
                    address: string;
                    name: string;
                };
                ty_args: FunctionTypeArgs[];
            };
        };
        sender: string;
        sequence_number: number;
    };
}

Type declaration

  • authenticator: {
        Ed25519: {
            public_key: string;
            signature: string;
        };
    }
    • Ed25519: {
          public_key: string;
          signature: string;
      }
      • public_key: string
      • signature: string
  • raw_txn: {
        chain_id: number;
        expiration_timestamp_secs: number;
        gas_unit_price: number;
        max_gas_amount: number;
        payload: {
            EntryFunction: {
                args: number[][];
                function: string;
                module: {
                    address: string;
                    name: string;
                };
                ty_args: FunctionTypeArgs[];
            };
        };
        sender: string;
        sequence_number: number;
    }
    • chain_id: number
    • expiration_timestamp_secs: number
    • gas_unit_price: number
    • max_gas_amount: number
    • payload: {
          EntryFunction: {
              args: number[][];
              function: string;
              module: {
                  address: string;
                  name: string;
              };
              ty_args: FunctionTypeArgs[];
          };
      }
      • EntryFunction: {
            args: number[][];
            function: string;
            module: {
                address: string;
                name: string;
            };
            ty_args: FunctionTypeArgs[];
        }
        • args: number[][]
        • function: string
        • module: {
              address: string;
              name: string;
          }
          • address: string
          • name: string
        • ty_args: FunctionTypeArgs[]
    • sender: string
    • sequence_number: number
\ No newline at end of file diff --git a/doc/interfaces/TransactionDetail.html b/docs/interfaces/TransactionDetail.html similarity index 94% rename from doc/interfaces/TransactionDetail.html rename to docs/interfaces/TransactionDetail.html index ef37c41..f243e2e 100644 --- a/doc/interfaces/TransactionDetail.html +++ b/docs/interfaces/TransactionDetail.html @@ -1,4 +1,4 @@ -TransactionDetail | supra-l1-sdk

Interface TransactionDetail

interface TransactionDetail {
    blockHash: undefined | string;
    blockNumber: undefined | number;
    events: any;
    gasUnitPrice: number;
    gasUsed: undefined | number;
    maxGasAmount: number;
    sender: string;
    sequenceNumber: number;
    status: TransactionStatus;
    transactionCost: undefined | number;
    transactionInsights: TransactionInsights;
    txConfirmationTime: undefined | number;
    txHash: string;
    vm_status: undefined | string;
}

Properties

blockHash +TransactionDetail | supra-l1-sdk

Interface TransactionDetail

interface TransactionDetail {
    blockHash: undefined | string;
    blockNumber: undefined | number;
    events: any;
    gasUnitPrice: number;
    gasUsed: undefined | number;
    maxGasAmount: number;
    sender: string;
    sequenceNumber: number;
    status: TransactionStatus;
    transactionCost: undefined | number;
    transactionInsights: TransactionInsights;
    txConfirmationTime: undefined | number;
    txHash: string;
    vm_status: undefined | string;
}

Properties

blockHash: undefined | string
blockNumber: undefined | number
events: any
gasUnitPrice: number
gasUsed: undefined | number
maxGasAmount: number
sender: string
sequenceNumber: number
transactionCost: undefined | number
transactionInsights: TransactionInsights
txConfirmationTime: undefined | number
txHash: string
vm_status: undefined | string
\ No newline at end of file +

Properties

blockHash: undefined | string
blockNumber: undefined | number
events: any
gasUnitPrice: number
gasUsed: undefined | number
maxGasAmount: number
sender: string
sequenceNumber: number
transactionCost: undefined | number
transactionInsights: TransactionInsights
txConfirmationTime: undefined | number
txHash: string
vm_status: undefined | string
\ No newline at end of file diff --git a/doc/interfaces/TransactionInsights.html b/docs/interfaces/TransactionInsights.html similarity index 96% rename from doc/interfaces/TransactionInsights.html rename to docs/interfaces/TransactionInsights.html index 6760c04..7aa2389 100644 --- a/doc/interfaces/TransactionInsights.html +++ b/docs/interfaces/TransactionInsights.html @@ -1,4 +1,4 @@ -TransactionInsights | supra-l1-sdk

Interface TransactionInsights

interface TransactionInsights {
    coinChange: CoinChange[];
    coinReceiver: string;
    type: TxTypeForTransactionInsights;
}

Properties

coinChange +TransactionInsights | supra-l1-sdk

Interface TransactionInsights

interface TransactionInsights {
    coinChange: CoinChange[];
    coinReceiver: string;
    type: TxTypeForTransactionInsights;
}

Properties

coinChange: CoinChange[]
coinReceiver: string
\ No newline at end of file +

Properties

coinChange: CoinChange[]
coinReceiver: string
\ No newline at end of file diff --git a/doc/interfaces/TransactionResponse.html b/docs/interfaces/TransactionResponse.html similarity index 95% rename from doc/interfaces/TransactionResponse.html rename to docs/interfaces/TransactionResponse.html index f3ef163..777b5cf 100644 --- a/doc/interfaces/TransactionResponse.html +++ b/docs/interfaces/TransactionResponse.html @@ -1,3 +1,3 @@ -TransactionResponse | supra-l1-sdk

Interface TransactionResponse

interface TransactionResponse {
    result: TransactionStatus;
    txHash: string;
}

Properties

result +TransactionResponse | supra-l1-sdk

Interface TransactionResponse

interface TransactionResponse {
    result: TransactionStatus;
    txHash: string;
}

Properties

Properties

txHash: string
\ No newline at end of file +

Properties

txHash: string
\ No newline at end of file diff --git a/doc/modules.html b/docs/modules.html similarity index 100% rename from doc/modules.html rename to docs/modules.html