Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AccountStore

Implements

Index

Constructors

  • new AccountStore(balance: number | bigint, account?: string | default): AccountStore

Properties

address: string
amount: bigint
appsLocalState: Map<number, AppLocalStateM>
appsTotalSchema: ApplicationStateSchema
assets: Map<number, AssetHoldingM>
createdApps: Map<number, SSCAttributesM>
createdAssets: Map<number, AssetParams>
minBalance: number

Methods

  • Deploy application in account's state check maximum account creation limit

    Parameters

    • appID: number

      application index

    • params: AppDeploymentFlags

      SSCDeployment Flags

    • approvalProgram: string

      application approval program

    • clearProgram: string

      application clear program NOTE - approval and clear program must be the TEAL code as string

    Returns CreatedAppM

  • addAsset(assetId: number, name: string, asaDef: { clawback?: string; decimals: number | bigint; defaultFrozen?: boolean; freeze?: string; manager?: string; metadataHash?: string | Uint8Array | Buffer; name?: string; note?: string; noteb64?: string; optInAccNames?: string[]; reserve?: string; total: string | number | bigint; unitName?: string; url?: string }): AssetParams
  • Deploy Asset in account's state

    Parameters

    • assetId: number

      Asset Index

    • name: string

      Asset Name

    • asaDef: { clawback?: string; decimals: number | bigint; defaultFrozen?: boolean; freeze?: string; manager?: string; metadataHash?: string | Uint8Array | Buffer; name?: string; note?: string; noteb64?: string; optInAccNames?: string[]; reserve?: string; total: string | number | bigint; unitName?: string; url?: string }

      Asset Definitions

      • Optional clawback?: string
      • decimals: number | bigint
      • Optional defaultFrozen?: boolean
      • Optional freeze?: string
      • Optional manager?: string
      • Optional metadataHash?: string | Uint8Array | Buffer
      • Optional name?: string
      • Optional note?: string
      • Optional noteb64?: string
      • Optional optInAccNames?: string[]
      • Optional reserve?: string
      • total: string | number | bigint
      • Optional unitName?: string
      • Optional url?: string

    Returns AssetParams

  • balance(): bigint
  • closeApp(appID: number): void
  • closeAsset(assetId: number): void
  • deleteApp(appID: number): void
  • destroyAsset(assetId: number): void
  • getAssetDef(assetId: number): undefined | AssetParams
  • getGlobalState(appID: number, key: string | Uint8Array): undefined | StackElem
  • getLocalState(appID: number, key: string | Uint8Array): undefined | StackElem
  • getSpendAddress(): string
  • modifyAsset(assetId: number, fields: AssetModFields): void
  • optInToASA(assetIndex: number, assetHolding: AssetHoldingM): void
  • rekeyTo(authAccountAddress: string): void
  • setFreezeState(assetId: number, state: boolean): void
  • setGlobalState(appID: number, key: string | Uint8Array, value: StackElem, line?: number): void
  • Set new key-value pair or update pair with existing key in account for application id: appID, throw error otherwise

    Parameters

    • appID: number
    • key: string | Uint8Array
    • value: StackElem
    • Optional line: number

      line number in TEAL file Note: if user is accessing this function directly through runtime, then line number is unknown

    Returns AppLocalStateM

Generated using TypeDoc