Constructors

Properties

_nodeClient: NodeClient

Methods

  • Returns a node client that can be used to make calls against

    Parameters

    • namespace: string

      the namespace for which the node client resides

    • networkNodeServicesMap: Map<string, NetworkNodeServices>

      a map of the service objects that proxy the nodes

    • operatorId: string

      the account id of the operator of the transactions

    • operatorKey: string

      the private key of the operator of the transactions

    • skipNodeAlias: string

      the node alias to skip

    Returns Promise<NodeClient>

    a node client that can be used to call transactions

  • gets the account info from Hedera network

    Parameters

    • accountId: string | AccountId

      the account

    Returns Promise<AccountInfo>

    the private key of the account

  • batch up the accounts into sets to be processed

    Parameters

    • OptionalaccountRange: number[][] = constants.SYSTEM_ACCOUNTS

    Returns number[][]

    an array of arrays of numbers representing the accounts to update

  • creates a new Hedera account

    Parameters

    • namespace: string

      the namespace to store the Kubernetes key secret into

    • privateKey: PrivateKey

      the private key of type PrivateKey

    • amount: number

      the amount of HBAR to add to the account

    • OptionalsetAlias: boolean = false

      whether to set the alias of the account to the public key, requires the ed25519PrivateKey supplied to be ECDSA

    Returns Promise<
        {
            accountAlias?: string;
            accountId: string;
            balance: number;
            privateKey: string;
            publicKey: string;
        },
    >

    a custom object with the account information in it

  • gets the account private and public key from the Kubernetes secret from which it is stored

    Parameters

    • accountId: string | AccountId

      the account

    Returns Promise<Key[]>

    the private key of the account

  • Gets a Map of the Hedera node services and the attributes needed, throws a SoloError if anything fails

    Parameters

    • namespace: string

      the namespace of the solo network deployment

    Returns Promise<Map<`node${number}`, NetworkNodeServices>>

    a map of the network node services

  • loads and initializes the Node Client

    Parameters

    • namespace: string

      the namespace of the network

    Returns Promise<NodeClient>

  • loads and initializes the Node Client, throws a SoloError if anything fails

    Parameters

    • namespace: string

      the namespace of the network

    • OptionalskipNodeAlias: `node${number}`

      the node alias to skip

    Returns Promise<NodeClient>

  • send an account key update transaction to the network of nodes

    Parameters

    • accountId: string | AccountId

      the account that will get its keys updated

    • newPrivateKey: string | PrivateKey

      the new private key

    • oldPrivateKey: string | PrivateKey

      the genesis key that is the current key

    Returns Promise<boolean>

    whether the update was successful

  • transfer the specified amount of HBAR from one account to another

    Parameters

    • fromAccountId: string | AccountId

      the account to pull the HBAR from

    • toAccountId: string | AccountId

      the account to put the HBAR

    • hbarAmount: number

      the amount of HBAR

    Returns Promise<boolean>

    if the transaction was successfully posted

  • update the account keys for a given account and store its new key in a Kubernetes secret

    Parameters

    • namespace: string

      the namespace of the nodes network

    • accountId: AccountId

      the account that will get its keys updated

    • genesisKey: PrivateKey

      the genesis key to compare against

    • updateSecrets: boolean

      whether to delete the secret prior to creating a new secret

    Returns Promise<
        | { status: string; value: string }
        | { reason: string; status: string; value: string },
    >

    the result of the call

  • updates a set of special accounts keys with a newly generated key and stores them in a Kubernetes secret

    Parameters

    • namespace: string

      the namespace of the nodes network

    • currentSet: number[]

      the accounts to update

    • updateSecrets: boolean

      whether to delete the secret prior to creating a new secret

    • resultTracker: { fulfilledCount: number; rejectedCount: number; skippedCount: number }

      an object to keep track of the results from the accounts that are being updated

    Returns Promise<{ fulfilledCount: number; rejectedCount: number; skippedCount: number }>

    the updated resultTracker object