A StacksNetwork with the parameters for the Stacks testnet. Pass a url option to override the default Hiro hosted Stacks node API. Pass a fetchFn option to customize the default networking functions.

Example

const network = new StacksTestnet();
const network = new StacksTestnet({ url: "https://stacks-node-api.testnet.stacks.co" });
const network = new StacksTestnet({ fetch: createFetchFn() });

Related

createFetchFn, createApiKeyMiddleware

Hierarchy

Constructors

Properties

accountEndpoint: string = '/v2/accounts'
bnsLookupUrl: string = 'https://stacks-node-api.mainnet.stacks.co'
broadcastEndpoint: string = '/v2/transactions'
chainId: ChainID = ChainID.Testnet
contractAbiEndpoint: string = '/v2/contracts/interface'
coreApiUrl: string
fetchFn: FetchFn
readOnlyFunctionCallEndpoint: string = '/v2/contracts/call-read'
transactionFeeEstimateEndpoint: string = '/v2/fees/transaction'
transferFeeEstimateEndpoint: string = '/v2/fees/transfer'
version: TransactionVersion = TransactionVersion.Testnet

Methods

  • Parameters

    • address: string
    • contract: string

    Returns string

  • Parameters

    • address: string

    Returns string

  • Parameters

    • contractAddress: string
    • contractName: string
    • dataVarName: string

    Returns string

  • Parameters

    • contractAddress: string
    • contractName: string
    • mapName: string

    Returns string

  • Parameters

    • fullyQualifiedName: string

    Returns Promise<any>

  • Parameters

    • contractAddress: string
    • contractName: string
    • functionName: string

    Returns string

  • Parameters

    • address: string
    • Optional options: any

    Returns string

  • Parameters

    • address: string
    • Optional options: any

    Returns string

  • Parameters

    • contractAddress: string
    • contractName: string

    Returns string

Generated using TypeDoc