@proto-kit/stackDocs


Documentation / @proto-kit/stack / TestBalances

Class: TestBalances

Base class for runtime modules providing the necessary utilities.

Extends

Constructors

new TestBalances()

new TestBalances(): TestBalances

Returns

TestBalances

Inherited from

Balances.constructor

Defined in

module/dist/runtime/RuntimeModule.d.ts:33

Properties

balances

balances: StateMap<BalancesKey, Balance>

Inherited from

Balances.balances

Defined in

library/dist/runtime/Balances.d.ts:84


currentConfig

protected currentConfig: undefined | NoConfig

Store the config separately, so that we can apply additional checks when retrieving it via the getter

Inherited from

Balances.currentConfig

Defined in

common/dist/config/ConfigurableModule.d.ts:17


events?

optional events: RuntimeEvents<any>

Inherited from

Balances.events

Defined in

module/dist/runtime/RuntimeModule.d.ts:31


isRuntimeModule

isRuntimeModule: boolean

This property exists only to typecheck that the RuntimeModule was extended correctly in e.g. a decorator. We need at least one non-optional property in this class to make the typechecking work.

Inherited from

Balances.isRuntimeModule

Defined in

module/dist/runtime/RuntimeModule.d.ts:28


messages?

optional messages: OutgoingMessages<OutgoingMessagesRecord>

Inherited from

Balances.messages

Defined in

module/dist/runtime/RuntimeModule.d.ts:32


name?

optional name: string

Inherited from

Balances.name

Defined in

module/dist/runtime/RuntimeModule.d.ts:29


parent?

optional parent: RuntimeEnvironment

Inherited from

Balances.parent

Defined in

module/dist/runtime/RuntimeModule.d.ts:30


runtimeMethodNames

readonly runtimeMethodNames: string[]

Holds all method names that are callable throw transactions

Inherited from

Balances.runtimeMethodNames

Defined in

module/dist/runtime/RuntimeModule.d.ts:22


totalSupply

totalSupply: State<UInt64>

We use satisfies here in order to be able to access presets by key in a type safe way.

Defined in

stack/src/scripts/graphql/server.ts:54


presets

static presets: Presets<unknown>

Inherited from

Balances.presets

Defined in

module/dist/runtime/RuntimeModule.d.ts:18

Accessors

config

Get Signature

get config(): Config

Returns

Config

Set Signature

set config(config): void

Parameters

config: Config

Returns

void

Inherited from

Balances.config

Defined in

common/dist/config/ConfigurableModule.d.ts:18


network

Get Signature

get network(): NetworkState

Returns

NetworkState

Inherited from

Balances.network

Defined in

module/dist/runtime/RuntimeModule.d.ts:36


transaction

Get Signature

get transaction(): RuntimeTransaction

Returns

RuntimeTransaction

Inherited from

Balances.transaction

Defined in

module/dist/runtime/RuntimeModule.d.ts:35

Methods

addBalance()

addBalance(tokenId, address, balance): Promise<void>

Parameters

tokenId: TokenId

address: PublicKey

balance: UInt64

Returns

Promise<void>

Defined in

stack/src/scripts/graphql/server.ts:65


burn()

burn(tokenId, address, amount): Promise<void>

Parameters

tokenId: TokenId

address: PublicKey

amount: Balance

Returns

Promise<void>

Inherited from

Balances.burn

Defined in

library/dist/runtime/Balances.d.ts:89


create()

create(childContainerProvider): void

Parameters

childContainerProvider: ChildContainerProvider

Returns

void

Inherited from

Balances.create

Defined in

common/dist/config/ConfigurableModule.d.ts:20


getBalance()

getBalance(tokenId, address): Promise<Balance>

Parameters

tokenId: TokenId

address: PublicKey

Returns

Promise<Balance>

Inherited from

Balances.getBalance

Defined in

library/dist/runtime/Balances.d.ts:85


getBalanceForUser()

getBalanceForUser(tokenId, address): Promise<Balance>

Parameters

tokenId: TokenId

address: PublicKey

Returns

Promise<Balance>

Defined in

stack/src/scripts/graphql/server.ts:57


getInputs()

getInputs(): RuntimeMethodExecutionData

Returns

RuntimeMethodExecutionData

Inherited from

Balances.getInputs

Defined in

module/dist/runtime/RuntimeModule.d.ts:34


mint()

mint(tokenId, address, amount): Promise<void>

Parameters

tokenId: TokenId

address: PublicKey

amount: Balance

Returns

Promise<void>

Inherited from

Balances.mint

Defined in

library/dist/runtime/Balances.d.ts:88


setBalance()

setBalance(tokenId, address, amount): Promise<void>

Parameters

tokenId: TokenId

address: PublicKey

amount: Balance

Returns

Promise<void>

Inherited from

Balances.setBalance

Defined in

library/dist/runtime/Balances.d.ts:86


transfer()

transfer(tokenId, from, to, amount): Promise<void>

Parameters

tokenId: TokenId

from: PublicKey

to: PublicKey

amount: Balance

Returns

Promise<void>

Inherited from

Balances.transfer

Defined in

library/dist/runtime/Balances.d.ts:87


transferSigned()

transferSigned(tokenId, from, to, amount): Promise<void>

Parameters

tokenId: TokenId

from: PublicKey

to: PublicKey

amount: Balance

Returns

Promise<void>

Inherited from

Balances.transferSigned

Defined in

library/dist/runtime/Balances.d.ts:90