@cfxlabsinc/b2b-services
    Preparing search index...

    Manage Solana nonce pool.

    This is for the corresponding workflow or admins to invoke. In service operations, you should be using SolanaNonceService instead.

    Index
    instance: (...args: []) => SolanaNonceAdminService = ...

    The process default: built from each dependency's own instance().

    • Ordered by insertion, so paging through stays stable while new accounts are added.

      Parameters

      • __namedParameters: { addresses?: Address[]; lockedBy?: string[]; page?: number; pageSize?: number } = {}
        • Optionaladdresses?: Address[]
        • OptionallockedBy?: string[]

          IDs that locked the nonce

        • Optionalpage?: number
        • OptionalpageSize?: number

      Returns Promise<
          {
              ok: true;
              value: { hasNext: boolean; items: SolanaNonce[]; total: number };
          },
      >

    • Parameters

      • __namedParameters: {
            address: Address;
            data: { nonce: Nonce | null; status?: "AVAILABLE" };
            expected?: Pick<
                SolanaNonce,
                "status"
                | "nonce"
                | "reservedFor"
                | "lockedBy",
            >;
        }
        • address: Address
        • data: { nonce: Nonce | null; status?: "AVAILABLE" }
          • nonce: Nonce | null

            null takes the account out of use: it is missing on-chain.

          • Optionalstatus?: "AVAILABLE"

            Return the nonce to the pool, dropping its reservation or lock.

        • Optionalexpected?: Pick<SolanaNonce, "status" | "nonce" | "reservedFor" | "lockedBy">

          Compare-and-set: write only while the row still matches this read, so a release or lock that landed after it is never overwritten.

      Returns Promise<
          | { ok: true; value: SolanaNonce }
          | {
              error:
                  | ServiceError<"SOLANA_NONCE_NOT_FOUND">
                  | ServiceError<"SOLANA_NONCE_CHANGED">;
              ok: false;
          },
      >