Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...

    Block: An item which contains a number of operations (transactions) which originated from an account at a particular instant

    Implements

    Index

    Constructors

    • Parameters

      • input:
            | string
            | Buffer
            | ArrayBuffer
            | BlockJSON
            | Block
            | {
                $binary?: string;
                $hash: BlockHash;
                $opening: boolean;
                account: GenericAccount;
                date: Date;
                idempotent: undefined
                | string;
                network: bigint;
                operations: ExportedJSONOperation[];
                previous: BlockHash;
                purpose: BlockPurpose;
                signature?: string;
                signatures?: string[];
                signer:
                    | Account<ECDSA_SECP256K1 | ED25519 | ECDSA_SECP256R1>
                    | [MultisigAddress, any[]];
                subnet: undefined | bigint;
                version: 1 | 2;
            }
            | {
                $binary?: string;
                $hash: BlockHashString;
                $opening: boolean;
                account: TokenPublicKeyString | NetworkPublicKeyString | StoragePublicKeyString | MultisigPublicKeyString | Secp256K1PublicKeyString | Secp256R1PublicKeyString | ED25519PublicKeyString;
                date: string;
                idempotent: undefined
                | string;
                network: string;
                operations: ExportedJSONOperation[];
                previous: BlockHashString;
                purpose: BlockPurpose;
                signature?: string;
                signatures?: string[];
                signer: Secp256K1PublicKeyString | Secp256R1PublicKeyString | ED25519PublicKeyString | [MultisigPublicKeyString, any[]];
                subnet: undefined | string;
                version: 1 | 2;
            }

      Returns Block

    Properties

    $opening: boolean = false
    date: Date
    idempotent: undefined | Buffer
    network: bigint
    operations: BlockOperations[]
    previous: BlockHash
    purpose: BlockPurpose
    subnet: undefined | bigint
    version: 1 | 2
    AdjustMethod: typeof AdjustMethod = AdjustMethod
    Builder: typeof BlockBuilder
    Hash: typeof BlockHash = BlockHash
    isInstance: (obj: any, strict?: boolean) => obj is Block = ...
    NO_PREVIOUS: "9bd05fa2-8e59-42a2-8153-26d8e8c10143:NO_PREVIOUS" = NO_PREVIOUS
    Operation: {
        CREATE_IDENTIFIER: typeof BlockOperationCREATE_IDENTIFIER;
        MANAGE_CERTIFICATE: typeof BlockOperationMANAGE_CERTIFICATE;
        MODIFY_PERMISSIONS: typeof BlockOperationMODIFY_PERMISSIONS;
        RECEIVE: typeof BlockOperationRECEIVE;
        SEND: typeof BlockOperationSEND;
        SET_INFO: typeof BlockOperationSET_INFO;
        SET_REP: typeof BlockOperationSET_REP;
        TOKEN_ADMIN_MODIFY_BALANCE: typeof BlockOperationTOKEN_ADMIN_MODIFY_BALANCE;
        TOKEN_ADMIN_SUPPLY: typeof BlockOperationTOKEN_ADMIN_SUPPLY;
    } = Operations.Operation
    OperationType: typeof OperationType = Operations.OperationType
    Purpose: typeof BlockPurpose = BlockPurpose

    Accessors

    • get hash(): BlockHash

      Hash of the block minus the signature

      XXX:TODO: Should the hash of the block normally include the signature ? One reason against is that it would allow for identical blocks that only differ by signature (which isn't signed)

      Returns BlockHash

    Methods

    • Parameters

      • includeSignatures: boolean = true

      Returns ArrayBuffer

    • Returns [
          version: 0n,
          network: bigint,
          subnet: null
          | bigint,
          idempotent: Buffer,
          date: Omit<ASN1Date, "kind"> & { kind: "general" },
          signer: Buffer,
          account: null | Buffer,
          previous: Buffer,
          operations: (
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, bigint];
                  kind: "explicit";
                  value: TOKEN_ADMIN_SUPPLY;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [Buffer, bigint, bigint];
                  kind: "explicit";
                  value: TOKEN_ADMIN_MODIFY_BALANCE;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, Buffer, undefined | null | Buffer[]];
                  kind: "explicit";
                  value: MANAGE_CERTIFICATE;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      bigint,
                      Buffer,
                      undefined
                      | Omit<ASN1String, "kind"> & { kind: "utf8" },
                  ];
                  kind: "explicit";
                  value: SEND;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [Buffer];
                  kind: "explicit";
                  value: SET_REP;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      undefined | [bigint, bigint],
                  ];
                  kind: "explicit";
                  value: SET_INFO;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      bigint,
                      null
                      | [bigint, bigint],
                      undefined | Buffer,
                  ];
                  kind: "explicit";
                  value: MODIFY_PERMISSIONS;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      | undefined
                      | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                          contains: [Buffer[], bigint];
                          kind: "explicit";
                          value: 7;
                      },
                  ];
                  kind: "explicit";
                  value: CREATE_IDENTIFIER;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, Buffer, Buffer, boolean, undefined | Buffer];
                  kind: "explicit";
                  value: RECEIVE;
              }
          )[],
      ]

    • Returns [
          network: bigint,
          subnet: bigint,
          idempotent: Buffer,
          date: Omit<ASN1Date, "kind"> & { kind: "general" },
          purpose: bigint,
          account: Buffer,
          signer: null | Buffer | [multisigPubKey: Buffer, signers: any[]],
          previous: Buffer,
          operations: (
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, bigint];
                  kind: "explicit";
                  value: TOKEN_ADMIN_SUPPLY;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [Buffer, bigint, bigint];
                  kind: "explicit";
                  value: TOKEN_ADMIN_MODIFY_BALANCE;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, Buffer, undefined | null | Buffer[]];
                  kind: "explicit";
                  value: MANAGE_CERTIFICATE;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      bigint,
                      Buffer,
                      undefined
                      | Omit<ASN1String, "kind"> & { kind: "utf8" },
                  ];
                  kind: "explicit";
                  value: SEND;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [Buffer];
                  kind: "explicit";
                  value: SET_REP;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      Omit<ASN1String, "kind"> & { kind: "utf8" },
                      undefined | [bigint, bigint],
                  ];
                  kind: "explicit";
                  value: SET_INFO;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      bigint,
                      null
                      | [bigint, bigint],
                      undefined | Buffer,
                  ];
                  kind: "explicit";
                  value: MODIFY_PERMISSIONS;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [
                      Buffer,
                      | undefined
                      | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                          contains: [Buffer[], bigint];
                          kind: "explicit";
                          value: 7;
                      },
                  ];
                  kind: "explicit";
                  value: CREATE_IDENTIFIER;
              }
              | Omit<ASN1ContextTag, "kind" | "value" | "contains"> & {
                  contains: [bigint, Buffer, Buffer, boolean, undefined | Buffer];
                  kind: "explicit";
                  value: RECEIVE;
              }
          )[],
      ]