@keetanetwork/keetanet-client 0.16.0 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/builder.d.ts +3 -3
- package/client/client_common_tests.d.ts +23 -4
- package/client/index-browser.d.ts +15 -13
- package/client/index-browser.js +878 -351
- package/client/index.d.ts +15 -13
- package/client/index.js +737 -253
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/KeetaNetSDK.Client.html +10 -10
- package/docs/classes/KeetaNetSDK.Referenced.Account.html +34 -31
- package/docs/classes/KeetaNetSDK.Referenced.BaseSet.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BaseVoteBuilder.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.Block.html +3 -3
- package/docs/classes/KeetaNetSDK.Referenced.BlockBuilder.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockHash.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperation.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationCREATE_IDENTIFIER.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMANAGE_CERTIFICATE.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMODIFY_PERMISSIONS.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationRECEIVE.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSEND.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_INFO.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_REP.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_MODIFY_BALANCE.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_SUPPLY.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.Certificate.html +7 -7
- package/docs/classes/KeetaNetSDK.Referenced.CertificateBundle.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.CertificateHash.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSAKeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1KeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PrivateKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PublicKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1Signature.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1KeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PrivateKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PublicKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1Signature.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ED25519KeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ED25519PrivateKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ED25519PublicKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ED25519Signature.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ExternalKeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.ExternalSet.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.IdempotentKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.IdentifierKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.IdentifierKeyPair.html +4 -4
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetError.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetErrorBase.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerError.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerIdempotentKeyError.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerVoteError.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeyInterface.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeyStorage.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.Ledger.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.LedgerAtomicInterface.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.P2PSwitch.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.PermissionSetHolder.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.PossiblyExpiredVote.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.PossiblyUnsignedBlock.html +3 -3
- package/docs/classes/KeetaNetSDK.Referenced.SignatureStorage.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.Stats.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.StatsPending.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.UnsignedBlock.html +3 -3
- package/docs/classes/KeetaNetSDK.Referenced.UserClientBuilder.html +11 -11
- package/docs/classes/KeetaNetSDK.Referenced.Vote.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteBlockBundle.html +4 -4
- package/docs/classes/KeetaNetSDK.Referenced.VoteBlockHash.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.VoteBuilder.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteHash.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.VoteLikeBase.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteQuote.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteQuoteBuilder.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteStaple.html +4 -4
- package/docs/classes/KeetaNetSDK.Referenced.VoteStapleHash.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_buffer.BufferStorage.html +1 -1
- package/docs/classes/KeetaNetSDK.UserClient.html +20 -20
- package/docs/documents/GETTING-STARTED.html +1 -1
- package/docs/enums/KeetaNetSDK.Referenced.AccountKeyAlgorithm.html +8 -8
- package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.applyNamespace.html +5 -0
- package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_helper.getTypedObjectEntries.html +1 -0
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ACLEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ACLUpdate.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ExplicitContextTag.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ImplicitContextTag.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ASN1Object.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseAccountInfo.html +10 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseExternalKeyPairFunctions.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseGenerationConfig.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierAccountInfo.html +12 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierCreateArguments.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperation.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationCREATE_IDENTIFIER.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATE.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMODIFY_PERMISSIONS.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationRECEIVE.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSEND.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_INFO.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_REP.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_SUPPLY.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1Canonical.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1JSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2Canonical.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BuilderBlockOptions.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.Constructor.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.DisposableTimingHandle.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ECDSA_SECP256K1AccountInfo.html +10 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.ECDSA_SECP256R1AccountInfo.html +10 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.ED25519AccountInfo.html +10 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsNoEncryption.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsSupportsEncryption.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.FeeAmountAndToken.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.FeeAmountAndTokenJSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.IdentifierCreateRequest.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.InitialConfigSupply.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.InstanceSet.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.KVGenericOptionsType.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.KVSetOptionsType.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.LedgerConfig.html +4 -4
- package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStorageAPI.html +5 -5
- package/docs/interfaces/KeetaNetSDK.Referenced.ModifyTokenBalanceEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.MultiSigIdentifierCreateArguments.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.MultisigAccountInfo.html +14 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.MultisigConfig.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.NetworkAccountInfo.html +12 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.NodeConfig.html +4 -4
- package/docs/interfaces/KeetaNetSDK.Referenced.NumericValueEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerBase.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerListener.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerRepBase.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperations.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperationsJSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.PrincipalACLWithInfoParsed.html +3 -10
- package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStorage.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.PublishOptions.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.RequestTokenReceiveEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.StorageAccountInfo.html +12 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.TokenAccountInfo.html +14 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.TokenNumericEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.UserClientConfig.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.UserClientOptions.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.VoteJSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.VoteStapleJSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.WithIsInstance.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.signOptionsType.html +16 -3
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1BitString.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Date.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1OID.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Set.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1String.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Struct.html +1 -1
- package/docs/modules/KeetaNetSDK.Referenced.html +1 -1
- package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.html +1 -0
- package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_helper.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.AccountInfo.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.AccountInfoForType.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.AccountInfoResponse.html +2 -2
- package/docs/types/KeetaNetSDK.Referenced.AccountInfoWithoutAccount.html +1 -0
- package/docs/types/{KeetaNetSDK.Referenced.src_lib_utils_helper.DistributiveOmit.html → KeetaNetSDK.Referenced.DistributiveOmit.html} +1 -1
- package/docs/types/KeetaNetSDK.Referenced.GetAccountStateAPIResponseFormatted.html +5 -12
- package/docs/types/KeetaNetSDK.Referenced.KeyPairAccountInfo.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.KeyPairKeyAlgorithm.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.NetworkAddress.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.StorageAddress.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.TokenAddress.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.TokenOrPending.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.UserEditableAccountInfo.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.VoteBuilderOptions.html +2 -2
- package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_conversion.ToJSONSerializable.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_initial.BaseNetworkInfo.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.allFullErrorCodes.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.identifierKeyTypes.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.KeetaNamespaceVersion.html +3 -0
- package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.MaxNamespaceLength.html +3 -0
- package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.namespacePrefixSchema.html +9 -0
- package/docs/variables/KeetaNetSDK.lib.html +2 -2
- package/lib/account.d.ts +39 -1
- package/lib/block/index.d.ts +126 -108
- package/lib/block/operations.d.ts +11 -0
- package/lib/error/account.d.ts +2 -2
- package/lib/error/index.d.ts +1 -1
- package/lib/error/vote.d.ts +2 -2
- package/lib/index.d.ts +4 -2
- package/lib/ledger/common.d.ts +15 -3
- package/lib/ledger/db_dynamodb.d.ts +6 -6
- package/lib/ledger/db_postgres.d.ts +3 -3
- package/lib/ledger/db_spanner.d.ts +4 -4
- package/lib/ledger/db_spanner_helper.d.ts +2 -2
- package/lib/ledger/db_sqlite.d.ts +3 -3
- package/lib/ledger/effects.d.ts +3 -1
- package/lib/ledger/index.d.ts +9 -9
- package/lib/ledger/types.d.ts +43 -9
- package/lib/log/target_gcp.js +3 -0
- package/lib/log/target_https.js +7 -0
- package/lib/utils/certificate.d.ts +13 -12
- package/lib/utils/conversion.d.ts +12 -3
- package/lib/utils/domain-separation.d.ts +31 -0
- package/lib/utils/external-keys/gcp-kms.d.ts +53 -0
- package/lib/utils/external-keys/gcp-kms.js +328 -0
- package/lib/utils/external-keys/passkey-prf.d.ts +1 -3
- package/lib/utils/external-keys/passkey-prf.js +6 -0
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/initial.d.ts +3 -2
- package/lib/utils/never.d.ts +4 -0
- package/lib/vote.d.ts +96 -89
- package/npm-shrinkwrap.json +30 -12
- package/package.json +2 -2
- package/version.d.ts +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.AccountInfo.html +0 -14
package/lib/account.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ type AccountKeyAlgorithmHexReverse = {
|
|
|
83
83
|
type AccountKeyAlgorithmHexToType<T extends PublicKeyAndTypeStringHex> = T extends `0x${infer AlgorithmHex1}${infer AlgorithmHex2}${string}` ? `0x${AlgorithmHex1}${AlgorithmHex2}` extends keyof AccountKeyAlgorithmHexReverse ? AccountKeyAlgorithmHexReverse[`0x${AlgorithmHex1}${AlgorithmHex2}`] : never : never;
|
|
84
84
|
declare const identifierKeyTypes: readonly [AccountKeyAlgorithm.NETWORK, AccountKeyAlgorithm.TOKEN, AccountKeyAlgorithm.STORAGE, AccountKeyAlgorithm.MULTISIG];
|
|
85
85
|
export type IdentifierKeyAlgorithm = typeof identifierKeyTypes[any];
|
|
86
|
+
export type KeyPairKeyAlgorithm = Exclude<AccountKeyAlgorithm, IdentifierKeyAlgorithm>;
|
|
86
87
|
/**
|
|
87
88
|
* Things we can use to construct a key from
|
|
88
89
|
*/
|
|
@@ -171,6 +172,25 @@ interface signOptionsType {
|
|
|
171
172
|
* is accept for X.509
|
|
172
173
|
*/
|
|
173
174
|
forCert?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Additional data (usually raw value) that is being signed
|
|
177
|
+
* For example, when signing a block this would be the output of UnsignedBlock.toBytes(false)
|
|
178
|
+
*/
|
|
179
|
+
ancillaryData?: ArrayBuffer;
|
|
180
|
+
/**
|
|
181
|
+
* Optional domain-separation namespace applied to `data` before hashing
|
|
182
|
+
* and signing (or verifying), using the `NamespacePrefix` schema. This
|
|
183
|
+
* prevents cross-context signature reuse between applications that
|
|
184
|
+
* share a key but use different namespaces.
|
|
185
|
+
*
|
|
186
|
+
* Signer and verifier MUST supply the same namespace. Domain separation
|
|
187
|
+
* is applied regardless of `raw`; `raw` controls only the subsequent
|
|
188
|
+
* hash step.
|
|
189
|
+
*
|
|
190
|
+
* If `namespace` is a string, the 1-255 byte limit applies to the UTF-8
|
|
191
|
+
* encoded namespace bytes, not the string's character count.
|
|
192
|
+
*/
|
|
193
|
+
namespace?: string | ArrayBuffer;
|
|
174
194
|
}
|
|
175
195
|
/**
|
|
176
196
|
* Signing function, accepts arbitrary data and returns a detached signature
|
|
@@ -372,16 +392,31 @@ declare class IdentifierKeyPair extends KeyInterface {
|
|
|
372
392
|
encrypt(..._ignored_parameters: Parameters<encryptFunctionType>): ReturnType<encryptFunctionType>;
|
|
373
393
|
decrypt(..._ignored_parameters: Parameters<decryptFunctionType>): ReturnType<decryptFunctionType>;
|
|
374
394
|
}
|
|
395
|
+
type KeyPairClassesByAlgorithm = {
|
|
396
|
+
[AccountKeyAlgorithm.ECDSA_SECP256K1]: typeof ECDSASECP256K1KeyPair;
|
|
397
|
+
[AccountKeyAlgorithm.ECDSA_SECP256R1]: typeof ECDSASECP256R1KeyPair;
|
|
398
|
+
[AccountKeyAlgorithm.ED25519]: typeof ED25519KeyPair;
|
|
399
|
+
[AccountKeyAlgorithm.NETWORK]: typeof IdentifierKeyPair;
|
|
400
|
+
[AccountKeyAlgorithm.TOKEN]: typeof IdentifierKeyPair;
|
|
401
|
+
[AccountKeyAlgorithm.STORAGE]: typeof IdentifierKeyPair;
|
|
402
|
+
[AccountKeyAlgorithm.MULTISIG]: typeof IdentifierKeyPair;
|
|
403
|
+
};
|
|
375
404
|
/**
|
|
376
405
|
* Account class, which is used to represent a key pair or an identifier
|
|
377
406
|
* account (which have no private key) such as tokens.
|
|
378
407
|
*
|
|
379
408
|
* @template T - The type of the key algorithm used for this account.
|
|
380
409
|
*/
|
|
381
|
-
export declare class Account<T extends AccountKeyAlgorithm =
|
|
410
|
+
export declare class Account<T extends AccountKeyAlgorithm = KeyPairKeyAlgorithm> {
|
|
382
411
|
#private;
|
|
383
412
|
static AccountKeyAlgorithm: typeof AccountKeyAlgorithm;
|
|
384
413
|
static ExternalKeyPair: typeof ExternalKeyPair;
|
|
414
|
+
/**
|
|
415
|
+
* Access to the underlying Key Pair classes for advanced use cases.
|
|
416
|
+
*/
|
|
417
|
+
static readonly KeyPairs: {
|
|
418
|
+
[K in AccountKeyAlgorithm]: KeyPairClassesByAlgorithm[K];
|
|
419
|
+
};
|
|
385
420
|
/**
|
|
386
421
|
* Construct an account from a public key string. The public key
|
|
387
422
|
* string encodes the type and public key data
|
|
@@ -562,6 +597,9 @@ export declare class Account<T extends AccountKeyAlgorithm = Exclude<AccountKeyA
|
|
|
562
597
|
* Determine if an account is an identifier
|
|
563
598
|
*/
|
|
564
599
|
isIdentifier(): this is IdentifierAddress;
|
|
600
|
+
/**
|
|
601
|
+
* Determine if an account is a regular (non-identifier)
|
|
602
|
+
*/
|
|
565
603
|
isAccount(): this is Account;
|
|
566
604
|
isKeyType<CheckType extends AccountKeyAlgorithm>(checkKeyType: CheckType): this is Account<CheckType>;
|
|
567
605
|
isStorage(): this is Account<AccountKeyAlgorithm.STORAGE>;
|
package/lib/block/index.d.ts
CHANGED
|
@@ -184,7 +184,7 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
|
|
|
184
184
|
readonly subnet: SubnetID | undefined;
|
|
185
185
|
readonly signer: BlockSignerField;
|
|
186
186
|
readonly signatures: HasSignature extends true ? BlockSignatureField : null;
|
|
187
|
-
get principal(): MultisigAddress | Account<
|
|
187
|
+
get principal(): MultisigAddress | Account<import("../account").KeyPairKeyAlgorithm>;
|
|
188
188
|
protected static getSortedRequiredSigners(input: BlockSignerField): Account[];
|
|
189
189
|
readonly $opening: boolean;
|
|
190
190
|
protected static isValidJSONSignedOrUnsigned<AssertSignatureField extends boolean, Version extends 1 | 2>(assertSignatureIncluded: AssertSignatureField, block: unknown, version?: Version): block is AssertSignatureField extends true ? ({
|
|
@@ -201,82 +201,94 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
|
|
|
201
201
|
protected static getV2ASN1ContainerWithoutSignature(input: BlockV2UnsignedCanonical | BlockV2Canonical): BlockV2ASN1WithoutSignature;
|
|
202
202
|
protected static getASN1ContainerWithoutSignature(input: Omit<BlockV1UnsignedCanonical, 'signature'> | Omit<BlockV2UnsignedCanonical, 'signatures'>): BlockASN1SchemaWithoutSignature;
|
|
203
203
|
toJSON(options?: ToJSONSerializableOptions): {
|
|
204
|
-
$binary?: string | undefined;
|
|
205
|
-
signature?: string | undefined;
|
|
206
|
-
signatures?: string[] | undefined;
|
|
207
204
|
version: 1 | 2;
|
|
208
|
-
idempotent: string | undefined;
|
|
209
205
|
date: string;
|
|
210
206
|
previous: BlockHashString;
|
|
211
207
|
account: import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
212
208
|
purpose: BlockPurpose;
|
|
213
209
|
signer: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [never, never[]])[]])[]])[]])[]];
|
|
214
210
|
network: string;
|
|
215
|
-
|
|
216
|
-
operations: ({
|
|
211
|
+
operations: (({
|
|
217
212
|
type: Operations.OperationType.SEND;
|
|
218
213
|
to: string;
|
|
219
214
|
amount: string;
|
|
220
215
|
token: import("../account").TokenPublicKeyString;
|
|
216
|
+
} & {
|
|
221
217
|
external?: string | undefined;
|
|
222
|
-
} | {
|
|
218
|
+
}) | ({
|
|
223
219
|
type: Operations.OperationType.SET_REP;
|
|
224
220
|
to: string;
|
|
225
|
-
} | {
|
|
221
|
+
} & {}) | ({
|
|
226
222
|
type: Operations.OperationType.SET_INFO;
|
|
227
223
|
name: string;
|
|
228
224
|
description: string;
|
|
229
225
|
metadata: string;
|
|
226
|
+
} & {
|
|
230
227
|
defaultPermission?: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | undefined;
|
|
231
|
-
} | {
|
|
228
|
+
}) | ({
|
|
232
229
|
type: Operations.OperationType.MODIFY_PERMISSIONS;
|
|
233
230
|
principal: string;
|
|
234
231
|
method: AdjustMethod;
|
|
235
232
|
permissions: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | null;
|
|
233
|
+
} & {
|
|
236
234
|
target?: string | undefined;
|
|
237
|
-
} | {
|
|
235
|
+
}) | ({
|
|
238
236
|
type: Operations.OperationType.CREATE_IDENTIFIER;
|
|
239
237
|
identifier: string;
|
|
240
|
-
|
|
238
|
+
} & {
|
|
239
|
+
createArguments?: ({
|
|
241
240
|
type: AccountKeyAlgorithm.MULTISIG;
|
|
242
241
|
signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
|
|
243
242
|
quorum: string;
|
|
244
|
-
} | {
|
|
243
|
+
} & {}) | ({
|
|
245
244
|
type: AccountKeyAlgorithm.MULTISIG;
|
|
246
245
|
signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
|
|
247
246
|
quorum: string;
|
|
248
|
-
} | undefined;
|
|
249
|
-
} | {
|
|
247
|
+
} & {}) | undefined;
|
|
248
|
+
}) | ({
|
|
250
249
|
type: Operations.OperationType.TOKEN_ADMIN_SUPPLY;
|
|
251
250
|
amount: string;
|
|
252
251
|
method: AdjustMethod.ADD | AdjustMethod.SUBTRACT;
|
|
253
|
-
} | {
|
|
252
|
+
} & {}) | ({
|
|
254
253
|
type: Operations.OperationType.TOKEN_ADMIN_MODIFY_BALANCE;
|
|
255
254
|
token: import("../account").TokenPublicKeyString;
|
|
256
255
|
amount: string;
|
|
257
256
|
method: AdjustMethod;
|
|
258
|
-
} | {
|
|
257
|
+
} & {}) | ({
|
|
259
258
|
type: Operations.OperationType.RECEIVE;
|
|
260
259
|
amount: string;
|
|
261
260
|
token: import("../account").TokenPublicKeyString;
|
|
262
261
|
from: string;
|
|
262
|
+
} & {
|
|
263
263
|
forward?: string | undefined;
|
|
264
264
|
exact?: boolean | undefined;
|
|
265
|
-
} | {
|
|
265
|
+
}) | ({
|
|
266
266
|
type: Operations.OperationType.MANAGE_CERTIFICATE;
|
|
267
267
|
certificateOrHash: string | (string & {
|
|
268
268
|
readonly __certificateHash: never;
|
|
269
|
-
}) | {
|
|
270
|
-
$binary?: string | undefined;
|
|
271
|
-
$chain?: undefined;
|
|
269
|
+
}) | ({
|
|
272
270
|
serial: string;
|
|
273
271
|
notBefore: string;
|
|
274
272
|
notAfter: string;
|
|
275
273
|
subject: string;
|
|
276
274
|
issuer: string;
|
|
277
275
|
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
278
|
-
|
|
279
|
-
|
|
276
|
+
subjectDN: {
|
|
277
|
+
name: string;
|
|
278
|
+
value: string;
|
|
279
|
+
}[];
|
|
280
|
+
issuerDN: {
|
|
281
|
+
name: string;
|
|
282
|
+
value: string;
|
|
283
|
+
}[];
|
|
284
|
+
$hash: string & {
|
|
285
|
+
readonly __certificateHash: never;
|
|
286
|
+
};
|
|
287
|
+
} & {
|
|
288
|
+
$binary?: string | undefined;
|
|
289
|
+
$chain?: undefined;
|
|
290
|
+
baseExtensions?: ({} & {
|
|
291
|
+
basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
|
|
280
292
|
keyUsage?: {
|
|
281
293
|
digitalSignature?: boolean | undefined;
|
|
282
294
|
nonRepudiation?: boolean | undefined;
|
|
@@ -289,12 +301,19 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
|
|
|
289
301
|
decipherOnly?: boolean | undefined;
|
|
290
302
|
} | undefined;
|
|
291
303
|
subjectKeyIdentifier?: string | undefined;
|
|
292
|
-
authorityKeyIdentifier?: {
|
|
304
|
+
authorityKeyIdentifier?: ({
|
|
293
305
|
type: "context";
|
|
294
306
|
value: 0;
|
|
295
307
|
contains: string;
|
|
296
|
-
} | undefined;
|
|
297
|
-
} | undefined;
|
|
308
|
+
} & {}) | undefined;
|
|
309
|
+
}) | undefined;
|
|
310
|
+
}) | ({
|
|
311
|
+
serial: string;
|
|
312
|
+
notBefore: string;
|
|
313
|
+
notAfter: string;
|
|
314
|
+
subject: string;
|
|
315
|
+
issuer: string;
|
|
316
|
+
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
298
317
|
subjectDN: {
|
|
299
318
|
name: string;
|
|
300
319
|
value: string;
|
|
@@ -306,17 +325,11 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
|
|
|
306
325
|
$hash: string & {
|
|
307
326
|
readonly __certificateHash: never;
|
|
308
327
|
};
|
|
309
|
-
}
|
|
328
|
+
} & {
|
|
310
329
|
$binary?: string | undefined;
|
|
311
330
|
$chain?: undefined;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
notAfter: string;
|
|
315
|
-
subject: string;
|
|
316
|
-
issuer: string;
|
|
317
|
-
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
318
|
-
baseExtensions: {
|
|
319
|
-
basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
|
|
331
|
+
baseExtensions?: ({} & {
|
|
332
|
+
basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
|
|
320
333
|
keyUsage?: {
|
|
321
334
|
digitalSignature?: boolean | undefined;
|
|
322
335
|
nonRepudiation?: boolean | undefined;
|
|
@@ -329,31 +342,27 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
|
|
|
329
342
|
decipherOnly?: boolean | undefined;
|
|
330
343
|
} | undefined;
|
|
331
344
|
subjectKeyIdentifier?: string | undefined;
|
|
332
|
-
authorityKeyIdentifier?: {
|
|
345
|
+
authorityKeyIdentifier?: ({
|
|
333
346
|
type: "context";
|
|
334
347
|
value: 0;
|
|
335
348
|
contains: string;
|
|
336
|
-
} | undefined;
|
|
337
|
-
} | undefined;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}[];
|
|
342
|
-
issuerDN: {
|
|
343
|
-
name: string;
|
|
344
|
-
value: string;
|
|
345
|
-
}[];
|
|
346
|
-
$hash: string & {
|
|
347
|
-
readonly __certificateHash: never;
|
|
348
|
-
};
|
|
349
|
-
};
|
|
349
|
+
} & {}) | undefined;
|
|
350
|
+
}) | undefined;
|
|
351
|
+
});
|
|
352
|
+
method: Exclude<AdjustMethod, AdjustMethod.SET>;
|
|
353
|
+
} & {
|
|
350
354
|
intermediateCertificates?: string | {
|
|
351
355
|
certificates: string[];
|
|
352
356
|
} | null | undefined;
|
|
353
|
-
|
|
354
|
-
})[];
|
|
357
|
+
}))[];
|
|
355
358
|
$hash: BlockHashString;
|
|
356
359
|
$opening: boolean;
|
|
360
|
+
} & {
|
|
361
|
+
$binary?: string | undefined;
|
|
362
|
+
signature?: string | undefined;
|
|
363
|
+
signatures?: string[] | undefined;
|
|
364
|
+
idempotent?: string | undefined;
|
|
365
|
+
subnet?: string | undefined;
|
|
357
366
|
};
|
|
358
367
|
/**
|
|
359
368
|
* Hash of the block minus the signature
|
|
@@ -407,78 +416,97 @@ export declare class BlockBuilder {
|
|
|
407
416
|
protected get currentWIP(): BlockJSONIncomplete;
|
|
408
417
|
protected get currentBlockSealed(): Block;
|
|
409
418
|
toJSON(opts?: ToJSONSerializableOptions): {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
+
purpose: BlockPurpose;
|
|
420
|
+
} & {
|
|
421
|
+
version?: number | undefined;
|
|
422
|
+
idempotent?: string | undefined;
|
|
423
|
+
date?: string | undefined;
|
|
424
|
+
previous?: BlockHashString | undefined;
|
|
425
|
+
account?: import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | undefined;
|
|
426
|
+
signer?: string | [string, (string | [string, (string | [string, (string | [string, (string | [string, never[]])[]])[]])[]])[]] | undefined;
|
|
427
|
+
network?: string | undefined;
|
|
428
|
+
subnet?: string | undefined;
|
|
429
|
+
operations?: (({
|
|
419
430
|
type: Operations.OperationType.SEND;
|
|
420
431
|
to: string;
|
|
421
432
|
amount: string;
|
|
422
433
|
token: import("../account").TokenPublicKeyString;
|
|
434
|
+
} & {
|
|
423
435
|
external?: string | undefined;
|
|
424
|
-
} | {
|
|
436
|
+
}) | ({
|
|
425
437
|
type: Operations.OperationType.SET_REP;
|
|
426
438
|
to: string;
|
|
427
|
-
} | {
|
|
439
|
+
} & {}) | ({
|
|
428
440
|
type: Operations.OperationType.SET_INFO;
|
|
429
441
|
name: string;
|
|
430
442
|
description: string;
|
|
431
443
|
metadata: string;
|
|
444
|
+
} & {
|
|
432
445
|
defaultPermission?: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | undefined;
|
|
433
|
-
} | {
|
|
446
|
+
}) | ({
|
|
434
447
|
type: Operations.OperationType.MODIFY_PERMISSIONS;
|
|
435
448
|
principal: string;
|
|
436
449
|
method: AdjustMethod;
|
|
437
450
|
permissions: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | null;
|
|
451
|
+
} & {
|
|
438
452
|
target?: string | undefined;
|
|
439
|
-
} | {
|
|
453
|
+
}) | ({
|
|
440
454
|
type: Operations.OperationType.CREATE_IDENTIFIER;
|
|
441
455
|
identifier: string;
|
|
442
|
-
|
|
456
|
+
} & {
|
|
457
|
+
createArguments?: ({
|
|
443
458
|
type: AccountKeyAlgorithm.MULTISIG;
|
|
444
459
|
signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
|
|
445
460
|
quorum: string;
|
|
446
|
-
} | {
|
|
461
|
+
} & {}) | ({
|
|
447
462
|
type: AccountKeyAlgorithm.MULTISIG;
|
|
448
463
|
signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
|
|
449
464
|
quorum: string;
|
|
450
|
-
} | undefined;
|
|
451
|
-
} | {
|
|
465
|
+
} & {}) | undefined;
|
|
466
|
+
}) | ({
|
|
452
467
|
type: Operations.OperationType.TOKEN_ADMIN_SUPPLY;
|
|
453
468
|
amount: string;
|
|
454
469
|
method: AdjustMethod.ADD | AdjustMethod.SUBTRACT;
|
|
455
|
-
} | {
|
|
470
|
+
} & {}) | ({
|
|
456
471
|
type: Operations.OperationType.TOKEN_ADMIN_MODIFY_BALANCE;
|
|
457
472
|
token: import("../account").TokenPublicKeyString;
|
|
458
473
|
amount: string;
|
|
459
474
|
method: AdjustMethod;
|
|
460
|
-
} | {
|
|
475
|
+
} & {}) | ({
|
|
461
476
|
type: Operations.OperationType.RECEIVE;
|
|
462
477
|
amount: string;
|
|
463
478
|
token: import("../account").TokenPublicKeyString;
|
|
464
479
|
from: string;
|
|
480
|
+
} & {
|
|
465
481
|
forward?: string | undefined;
|
|
466
482
|
exact?: boolean | undefined;
|
|
467
|
-
} | {
|
|
483
|
+
}) | ({
|
|
468
484
|
type: Operations.OperationType.MANAGE_CERTIFICATE;
|
|
469
485
|
certificateOrHash: string | (string & {
|
|
470
486
|
readonly __certificateHash: never;
|
|
471
|
-
}) | {
|
|
472
|
-
$binary?: string | undefined;
|
|
473
|
-
$chain?: undefined;
|
|
487
|
+
}) | ({
|
|
474
488
|
serial: string;
|
|
475
489
|
notBefore: string;
|
|
476
490
|
notAfter: string;
|
|
477
491
|
subject: string;
|
|
478
492
|
issuer: string;
|
|
479
493
|
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
480
|
-
|
|
481
|
-
|
|
494
|
+
subjectDN: {
|
|
495
|
+
name: string;
|
|
496
|
+
value: string;
|
|
497
|
+
}[];
|
|
498
|
+
issuerDN: {
|
|
499
|
+
name: string;
|
|
500
|
+
value: string;
|
|
501
|
+
}[];
|
|
502
|
+
$hash: string & {
|
|
503
|
+
readonly __certificateHash: never;
|
|
504
|
+
};
|
|
505
|
+
} & {
|
|
506
|
+
$binary?: string | undefined;
|
|
507
|
+
$chain?: undefined;
|
|
508
|
+
baseExtensions?: ({} & {
|
|
509
|
+
basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
|
|
482
510
|
keyUsage?: {
|
|
483
511
|
digitalSignature?: boolean | undefined;
|
|
484
512
|
nonRepudiation?: boolean | undefined;
|
|
@@ -491,12 +519,19 @@ export declare class BlockBuilder {
|
|
|
491
519
|
decipherOnly?: boolean | undefined;
|
|
492
520
|
} | undefined;
|
|
493
521
|
subjectKeyIdentifier?: string | undefined;
|
|
494
|
-
authorityKeyIdentifier?: {
|
|
522
|
+
authorityKeyIdentifier?: ({
|
|
495
523
|
type: "context";
|
|
496
524
|
value: 0;
|
|
497
525
|
contains: string;
|
|
498
|
-
} | undefined;
|
|
499
|
-
} | undefined;
|
|
526
|
+
} & {}) | undefined;
|
|
527
|
+
}) | undefined;
|
|
528
|
+
}) | ({
|
|
529
|
+
serial: string;
|
|
530
|
+
notBefore: string;
|
|
531
|
+
notAfter: string;
|
|
532
|
+
subject: string;
|
|
533
|
+
issuer: string;
|
|
534
|
+
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
500
535
|
subjectDN: {
|
|
501
536
|
name: string;
|
|
502
537
|
value: string;
|
|
@@ -508,17 +543,11 @@ export declare class BlockBuilder {
|
|
|
508
543
|
$hash: string & {
|
|
509
544
|
readonly __certificateHash: never;
|
|
510
545
|
};
|
|
511
|
-
}
|
|
546
|
+
} & {
|
|
512
547
|
$binary?: string | undefined;
|
|
513
548
|
$chain?: undefined;
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
notAfter: string;
|
|
517
|
-
subject: string;
|
|
518
|
-
issuer: string;
|
|
519
|
-
subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
520
|
-
baseExtensions: {
|
|
521
|
-
basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
|
|
549
|
+
baseExtensions?: ({} & {
|
|
550
|
+
basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
|
|
522
551
|
keyUsage?: {
|
|
523
552
|
digitalSignature?: boolean | undefined;
|
|
524
553
|
nonRepudiation?: boolean | undefined;
|
|
@@ -531,31 +560,20 @@ export declare class BlockBuilder {
|
|
|
531
560
|
decipherOnly?: boolean | undefined;
|
|
532
561
|
} | undefined;
|
|
533
562
|
subjectKeyIdentifier?: string | undefined;
|
|
534
|
-
authorityKeyIdentifier?: {
|
|
563
|
+
authorityKeyIdentifier?: ({
|
|
535
564
|
type: "context";
|
|
536
565
|
value: 0;
|
|
537
566
|
contains: string;
|
|
538
|
-
} | undefined;
|
|
539
|
-
} | undefined;
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}[];
|
|
544
|
-
issuerDN: {
|
|
545
|
-
name: string;
|
|
546
|
-
value: string;
|
|
547
|
-
}[];
|
|
548
|
-
$hash: string & {
|
|
549
|
-
readonly __certificateHash: never;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
567
|
+
} & {}) | undefined;
|
|
568
|
+
}) | undefined;
|
|
569
|
+
});
|
|
570
|
+
method: Exclude<AdjustMethod, AdjustMethod.SET>;
|
|
571
|
+
} & {
|
|
552
572
|
intermediateCertificates?: string | {
|
|
553
573
|
certificates: string[];
|
|
554
574
|
} | null | undefined;
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
purpose: BlockPurpose;
|
|
558
|
-
$opening: boolean | undefined;
|
|
575
|
+
}))[] | undefined;
|
|
576
|
+
$opening?: boolean | undefined;
|
|
559
577
|
};
|
|
560
578
|
getUnsignedBlock(): Promise<UnsignedBlock>;
|
|
561
579
|
seal(): Promise<Block>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ValidateASN1 } from '../utils/asn1';
|
|
2
|
+
import type { ASN1AnyJS } from '../utils/asn1';
|
|
2
3
|
import type { DeepMutable } from '../utils/helper';
|
|
3
4
|
import type { GenericAccount, IdentifierAddress, IdentifierKeyAlgorithm, TokenAddress, TokenPublicKeyString } from '../account';
|
|
4
5
|
import Account, { AccountKeyAlgorithm } from '../account';
|
|
@@ -86,6 +87,8 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
86
87
|
readonly kind: "utf8";
|
|
87
88
|
};
|
|
88
89
|
}, {
|
|
90
|
+
readonly encode: (data: Permissions | undefined) => bigint[] | undefined;
|
|
91
|
+
readonly decode: (data: ASN1AnyJS) => Permissions | undefined;
|
|
89
92
|
readonly name: "defaultPermission";
|
|
90
93
|
readonly schema: {
|
|
91
94
|
readonly optional: readonly [typeof ValidateASN1.IsInteger, typeof ValidateASN1.IsInteger];
|
|
@@ -98,6 +101,8 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
98
101
|
readonly name: "method";
|
|
99
102
|
readonly schema: typeof ValidateASN1.IsInteger;
|
|
100
103
|
}, {
|
|
104
|
+
readonly encode: (data: Permissions | null) => bigint[] | null;
|
|
105
|
+
readonly decode: (data: ASN1AnyJS) => Permissions | null;
|
|
101
106
|
readonly name: "permissions";
|
|
102
107
|
readonly schema: {
|
|
103
108
|
readonly choice: [typeof ValidateASN1.IsNull, readonly [typeof ValidateASN1.IsInteger, typeof ValidateASN1.IsInteger]];
|
|
@@ -125,6 +130,8 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
125
130
|
}];
|
|
126
131
|
};
|
|
127
132
|
};
|
|
133
|
+
readonly encode: (data: MultiSigIdentifierCreateArguments | undefined) => ASN1AnyJS;
|
|
134
|
+
readonly decode: (data: ASN1AnyJS) => IdentifierCreateArguments | undefined;
|
|
128
135
|
}];
|
|
129
136
|
readonly TOKEN_ADMIN_SUPPLY: [{
|
|
130
137
|
readonly name: "amount";
|
|
@@ -149,6 +156,8 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
149
156
|
}, {
|
|
150
157
|
readonly name: "certificateOrHash";
|
|
151
158
|
readonly schema: typeof ValidateASN1.IsOctetString;
|
|
159
|
+
readonly encode: (data: Certificate | CertificateHash) => Buffer;
|
|
160
|
+
readonly decode: (data: ASN1AnyJS) => Certificate | CertificateHash;
|
|
152
161
|
}, {
|
|
153
162
|
readonly name: "intermediateCertificates";
|
|
154
163
|
readonly schema: {
|
|
@@ -158,6 +167,8 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
158
167
|
}];
|
|
159
168
|
};
|
|
160
169
|
};
|
|
170
|
+
readonly decode: (data: ASN1AnyJS) => CertificateBundle | null;
|
|
171
|
+
readonly encode: (data: CertificateBundle | null | undefined) => Buffer[] | null;
|
|
161
172
|
}];
|
|
162
173
|
};
|
|
163
174
|
type ExtractSchemaFromBase<T extends {
|
package/lib/error/account.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeetaNetErrorBase } from './base';
|
|
2
|
-
export declare const AccountErrorCodes: readonly ["INVALID_PREFIX", "INVALID_KEYTYPE", "INVALID_KEYTYPE_EXTERNAL", "PASSPHRASE_WEAK", "INVALID_CONSTRUCTION", "NO_IDENTIFIER_SIGN", "NO_IDENTIFIER_VERIFY", "INVALID_IDENTIFIER_CONSTRUCTION", "SEED_INDEX_UNDEFINED", "SEED_INDEX_NEGATIVE", "SEED_INDEX_NOT_INT", "SEED_INDEX_TOO_LARGE", "ENCRYPTION_NOT_SUPPORTED"];
|
|
3
|
-
export declare const FullAccountErrorCodes: ("
|
|
2
|
+
export declare const AccountErrorCodes: readonly ["INVALID_PREFIX", "INVALID_KEYTYPE", "INVALID_KEYTYPE_EXTERNAL", "PASSPHRASE_WEAK", "INVALID_CONSTRUCTION", "NO_IDENTIFIER_SIGN", "NO_IDENTIFIER_VERIFY", "NOT_ACCOUNT", "NOT_IDENTIFIER", "INVALID_IDENTIFIER_CONSTRUCTION", "SEED_INDEX_UNDEFINED", "SEED_INDEX_NEGATIVE", "SEED_INDEX_NOT_INT", "SEED_INDEX_TOO_LARGE", "ENCRYPTION_NOT_SUPPORTED", "NAMESPACE_EMPTY", "NAMESPACE_TOO_LONG"];
|
|
3
|
+
export declare const FullAccountErrorCodes: ("ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_NOT_ACCOUNT" | "ACCOUNT_NOT_IDENTIFIER" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED" | "ACCOUNT_NAMESPACE_EMPTY" | "ACCOUNT_NAMESPACE_TOO_LONG")[];
|
|
4
4
|
export type AccountErrorCode = typeof FullAccountErrorCodes[number];
|
|
5
5
|
export default class KeetaNetAccountError extends KeetaNetErrorBase<AccountErrorCode> {
|
|
6
6
|
static readonly isInstance: (obj: any, strict?: boolean) => obj is KeetaNetAccountError;
|
package/lib/error/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeetaNetErrorBase } from './base';
|
|
2
2
|
import { KeetaNetLedgerError, KeetaNetLedgerVoteError, KeetaNetLedgerIdempotentKeyError } from './ledger';
|
|
3
|
-
declare const allFullErrorCodes: readonly ("PERMISSIONS_CANNOT_MIX_FLAGS_AND_TYPES" | "PERMISSIONS_EXTERNAL_OFFSET_TOO_LARGE" | "PERMISSIONS_INVALID_EXTERNAL_FLAG" | "PERMISSIONS_INVALID_FLAG" | "PERMISSIONS_INVALID_FLAG_ASSERTION" | "BLOCK_AMOUNT_BELOW_ZERO" | "BLOCK_CANNOT_FORWARD_TO_SELF" | "BLOCK_CANNOT_SEND_NON_TOKEN" | "BLOCK_CERTIFICATE_SUBJECT_MISMATCH" | "BLOCK_EXACT_TRUE_WHEN_FORWARDING" | "BLOCK_EXTERNAL_INVALID" | "BLOCK_EXTERNAL_MISSING" | "BLOCK_EXTERNAL_TOO_LONG" | "BLOCK_GENERAL_FIELD_INVALID" | "BLOCK_IDENTIFIER_INVALID" | "BLOCK_IDENTIFIER_NEED_DEFAULT_PERMISSIONS" | "BLOCK_INTERMEDIATE_CERTIFICATES_ONLY_ADD" | "BLOCK_INVALID_ACCOUNT_TYPE" | "BLOCK_INVALID_CERTIFICATE_VALUE" | "BLOCK_INVALID_CREATE_IDENTIFIER_ARGS" | "BLOCK_INVALID_IDEMPOTENT_FORMAT" | "BLOCK_INVALID_IDEMPOTENT_LENGTH" | "BLOCK_INVALID_MULTISIG_QUORUM" | "BLOCK_INVALID_MULTISIG_SIGNER_COUNT" | "BLOCK_INVALID_MULTISIG_SIGNER_DEPTH" | "BLOCK_INVALID_MULTISIG_SIGNER_DUPLICATE" | "BLOCK_INVALID_PURPOSE_VALIDATION" | "BLOCK_INVALID_SIGNATURE" | "BLOCK_INVALID_SIGNER" | "BLOCK_INVALID_TYPE" | "BLOCK_INVALID_VERSION" | "BLOCK_NO_ADMIN_ON_TARGET" | "BLOCK_NO_DELEGATE_ADMIN" | "BLOCK_NO_DUPLICATE_CERTIFICATE_OPERATION" | "BLOCK_NO_IDENTIFIER_OP" | "BLOCK_NO_MODIFY_PERMISSION_DUPE" | "BLOCK_NO_MULTIPLE_SET_REP" | "BLOCK_NO_MULTISIG_OP" | "BLOCK_NO_TOKEN_OP" | "BLOCK_ONLY_IDENTIFIER_OP" | "BLOCK_ONLY_TOKEN_OP" | "BLOCK_PERMISSIONS_INVALID_DEFAULT" | "BLOCK_PERMISSIONS_INVALID_ENTITY" | "BLOCK_PERMISSIONS_INVALID_PRINCIPAL" | "BLOCK_PERMISSIONS_INVALID_TARGET" | "BLOCK_PREVIOUS_SELF" | "BLOCK_SUPPLY_INVALID" | "BLOCK_TOKEN_RECEIVE_DIFFERS" | "BLOCK_SIGNATURE_REQUIRED" | "BLOCK_SIGNATURE_PARAMETER_DIFFERS" | "CERTIFICATE_INVALID_VERSION" | "CERTIFICATE_DUPLICATE_INCLUDED" | "CERTIFICATE_ORPHAN_FOUND" | "CERTIFICATE_CYCLE_FOUND" | "CERTIFICATE_SECONDARY_GRAPH" | "CERTIFICATE_MISSING_FIELD" | "CERTIFICATE_SIGNATURE_ALGORITHM_MISMATCH" | "CERTIFICATE_SELF_SIGNED_VALIDATION_FAILED" | "CERTIFICATE_CHAIN_VERIFICATION_FAILED" | "CERTIFICATE_DUPLICATE_EXTENSION" | "CERTIFICATE_EXTENSION_NOT_PROCESSED" | "CERTIFICATE_INVALID_SIGNATURE_ALGORITHM" | "CERTIFICATE_INVALID_GRAPH_COUNT" | "CERTIFICATE_MOMENT_INVALID" | "
|
|
3
|
+
declare const allFullErrorCodes: readonly ("ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_NOT_ACCOUNT" | "ACCOUNT_NOT_IDENTIFIER" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED" | "ACCOUNT_NAMESPACE_EMPTY" | "ACCOUNT_NAMESPACE_TOO_LONG" | "PERMISSIONS_CANNOT_MIX_FLAGS_AND_TYPES" | "PERMISSIONS_EXTERNAL_OFFSET_TOO_LARGE" | "PERMISSIONS_INVALID_EXTERNAL_FLAG" | "PERMISSIONS_INVALID_FLAG" | "PERMISSIONS_INVALID_FLAG_ASSERTION" | "BLOCK_AMOUNT_BELOW_ZERO" | "BLOCK_CANNOT_FORWARD_TO_SELF" | "BLOCK_CANNOT_SEND_NON_TOKEN" | "BLOCK_CERTIFICATE_SUBJECT_MISMATCH" | "BLOCK_EXACT_TRUE_WHEN_FORWARDING" | "BLOCK_EXTERNAL_INVALID" | "BLOCK_EXTERNAL_MISSING" | "BLOCK_EXTERNAL_TOO_LONG" | "BLOCK_GENERAL_FIELD_INVALID" | "BLOCK_IDENTIFIER_INVALID" | "BLOCK_IDENTIFIER_NEED_DEFAULT_PERMISSIONS" | "BLOCK_INTERMEDIATE_CERTIFICATES_ONLY_ADD" | "BLOCK_INVALID_ACCOUNT_TYPE" | "BLOCK_INVALID_CERTIFICATE_VALUE" | "BLOCK_INVALID_CREATE_IDENTIFIER_ARGS" | "BLOCK_INVALID_IDEMPOTENT_FORMAT" | "BLOCK_INVALID_IDEMPOTENT_LENGTH" | "BLOCK_INVALID_MULTISIG_QUORUM" | "BLOCK_INVALID_MULTISIG_SIGNER_COUNT" | "BLOCK_INVALID_MULTISIG_SIGNER_DEPTH" | "BLOCK_INVALID_MULTISIG_SIGNER_DUPLICATE" | "BLOCK_INVALID_PURPOSE_VALIDATION" | "BLOCK_INVALID_SIGNATURE" | "BLOCK_INVALID_SIGNER" | "BLOCK_INVALID_TYPE" | "BLOCK_INVALID_VERSION" | "BLOCK_NO_ADMIN_ON_TARGET" | "BLOCK_NO_DELEGATE_ADMIN" | "BLOCK_NO_DUPLICATE_CERTIFICATE_OPERATION" | "BLOCK_NO_IDENTIFIER_OP" | "BLOCK_NO_MODIFY_PERMISSION_DUPE" | "BLOCK_NO_MULTIPLE_SET_REP" | "BLOCK_NO_MULTISIG_OP" | "BLOCK_NO_TOKEN_OP" | "BLOCK_ONLY_IDENTIFIER_OP" | "BLOCK_ONLY_TOKEN_OP" | "BLOCK_PERMISSIONS_INVALID_DEFAULT" | "BLOCK_PERMISSIONS_INVALID_ENTITY" | "BLOCK_PERMISSIONS_INVALID_PRINCIPAL" | "BLOCK_PERMISSIONS_INVALID_TARGET" | "BLOCK_PREVIOUS_SELF" | "BLOCK_SUPPLY_INVALID" | "BLOCK_TOKEN_RECEIVE_DIFFERS" | "BLOCK_SIGNATURE_REQUIRED" | "BLOCK_SIGNATURE_PARAMETER_DIFFERS" | "CERTIFICATE_INVALID_VERSION" | "CERTIFICATE_DUPLICATE_INCLUDED" | "CERTIFICATE_ORPHAN_FOUND" | "CERTIFICATE_CYCLE_FOUND" | "CERTIFICATE_SECONDARY_GRAPH" | "CERTIFICATE_MISSING_FIELD" | "CERTIFICATE_SIGNATURE_ALGORITHM_MISMATCH" | "CERTIFICATE_SELF_SIGNED_VALIDATION_FAILED" | "CERTIFICATE_CHAIN_VERIFICATION_FAILED" | "CERTIFICATE_DUPLICATE_EXTENSION" | "CERTIFICATE_EXTENSION_NOT_PROCESSED" | "CERTIFICATE_INVALID_SIGNATURE_ALGORITHM" | "CERTIFICATE_INVALID_GRAPH_COUNT" | "CERTIFICATE_MOMENT_INVALID" | "VOTE_INVALID_CONSTRUCTION" | "VOTE_INVALID_VERSION" | "VOTE_SERIAL_MISMATCH" | "VOTE_INVALID_CONSTRUCTION_JSON" | "VOTE_SIGNATURE_INVALID" | "VOTE_EXPIRED" | "VOTE_INVALID_VALIDITY" | "VOTE_MOMENT_BEFORE_VALIDITY_FROM" | "VOTE_STAPLE_INVALID_CONSTRUCTION" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_COUNT" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_MISSING" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_ORDER" | "VOTE_STAPLE_DUPLICATE_VOTE_ISSUER" | "VOTE_STAPLE_PERMANENCE_MISMATCH" | "VOTE_BUILDER_INVALID_CONSTRUCTION" | "VOTE_BUILDER_INVALID_BLOCK_TYPE" | "VOTE_BUILDER_INVALID_SERIAL" | "VOTE_BUILDER_INVALID_VALID_TO_FROM" | "VOTE_BUILDER_INVALID_FEE" | "VOTE_MALFORMED_WRAPPER" | "VOTE_MALFORMED_VOTE_WRAPPER" | "VOTE_MALFORMED_VOTE_CONTENT" | "VOTE_MALFORMED_VOTE_CONTENT_EXTRA_DATA" | "VOTE_MALFORMED_VOTE_VERSION" | "VOTE_MALFORMED_VOTE_SERIAL" | "VOTE_MALFORMED_VOTE_SIGNATURE_INFORMATION" | "VOTE_MALFORMED_VOTE_ISSUER_INFORMATION" | "VOTE_MALFORMED_VOTE_SUBJECT_INFORMATION" | "VOTE_MALFORMED_VOTE_VALIDITY_INFORMATION" | "VOTE_MALFORMED_VOTE_EXTENSIONS" | "VOTE_MALFORMED_VOTE_EXTENSIONS_DATA" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_OID" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL_TYPE" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_ISSUER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_WRAPPER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_ECDSA_INVALID_CURVE" | "VOTE_MALFORMED_VOTE_SIGNATURE_UNSUPPORTED_SCHEME" | "VOTE_MALFORMED_VOTE_SUBJECT_PUBLIC_KEY_INFORMATION" | "VOTE_MALFORMED_VOTE_SIGNATURE_VALUE" | "VOTE_MALFORMED_VOTE_NO_BLOCKS_FOUND" | "VOTE_MALFORMED_STAPLE" | "VOTE_MALFORMED_STAPLE_BLOCKS" | "VOTE_MALFORMED_STAPLE_BLOCKS_AT_LEAST_ONE" | "VOTE_MALFORMED_STAPLE_VOTES" | "VOTE_MALFORMED_STAPLE_VOTES_AT_LEAST_ONE" | "VOTE_MALFORMED_FIND_RDN_INVALID_TYPE" | "VOTE_MALFORMED_FIND_RDN_MUST_HAVE_ONE" | "VOTE_MALFORMED_FIND_RDN_PART_WELL_FORMED" | "VOTE_MALFORMED_FIND_RDN_MUST_BE_SET" | "VOTE_MALFORMED_FIND_RDN_TYPE_MUST_BE_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_CONTEXT_SPECIFIC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NEEDS_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_HASH_DATA_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NOT_TWO_ITEMS" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_FUNC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_SECOND_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_FEES_AMOUNT" | "VOTE_MALFORMED_FEES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_FEES_IN_PERMANENT_VOTE" | "VOTE_MALFORMED_FEES_INVALID_QUOTE_VALUE" | "VOTE_MALFORMED_FEES_MULTIPLE_FEE_EMPTY" | "VOTE_MALFORMED_FEES_PAY_TO_INVALID" | "VOTE_MALFORMED_FEES_TOKEN_NOT_TOKEN" | "VOTE_FEE_IS_QUOTE" | "VOTE_FEE_QUOTE_MISSING_FEES" | "VOTE_FEE_NOT_QUOTE" | "VOTE_MALFORMED_FEES_KIND_MISSING" | "VOTE_MALFORMED_FEES_QUOTE_INVALID" | "LEDGER_BLOCK_ALREADY_EXISTS" | "LEDGER_BLOCK_EXPIRED" | "LEDGER_TRANSACTION_ABORTED" | "LEDGER_INVALID_CHAIN" | "LEDGER_INVALID_NETWORK" | "LEDGER_INVALID_SUBNET" | "LEDGER_INVALID_PERMISSIONS" | "LEDGER_INVALID_OWNER_COUNT" | "LEDGER_INVALID_BALANCE" | "LEDGER_INVALID_SET_REP" | "LEDGER_OPERATION_NOT_SUPPORTED" | "LEDGER_NOT_EMPTY" | "LEDGER_PREVIOUS_ALREADY_USED" | "LEDGER_PREVIOUS_NOT_SEEN" | "LEDGER_SUCCESSOR_VOTE_EXISTS" | "LEDGER_INSUFFICIENT_VOTING_WEIGHT" | "LEDGER_INVALID_ACCOUNT_INFO_KEY" | "LEDGER_RECEIVE_NOT_MET" | "LEDGER_DUPLICATE_VOTE_FOUND" | "LEDGER_CANNOT_EXCHANGE_PERM_VOTE" | "LEDGER_TEMP_VOTE_INCLUDES_SELF" | "LEDGER_BLOCKS_DIFFER_FROM_VOTED_ON" | "LEDGER_NO_PERM_WITHOUT_SELF_TEMP" | "LEDGER_DUPLICATE_VOTE_ISSUER_FOUND" | "LEDGER_OTHER" | "LEDGER_MISSING_BLOCKS" | "LEDGER_FEE_AMOUNT_MISMATCH" | "LEDGER_FEE_TOKEN_MISMATCH" | "LEDGER_FEE_MISSING" | "LEDGER_MISSING_REQUIRED_FEE_BLOCK" | "LEDGER_MULTIPLE_FEE_BLOCK" | "LEDGER_VOTE_WITH_QUOTE" | "LEDGER_QUOTE_MISMATCH" | "LEDGER_REQUIRED_FEE_MISMATCH" | "LEDGER_NOT_SUCCESSOR" | "LEDGER_NOT_OPENING" | "LEDGER_IDEMPOTENT_KEY_EXISTS" | "API_INVALID_LIMIT" | "API_INVALID_SIDE" | "API_INVALID_START" | "API_LIMIT_NOT_NUMBER" | "API_LIMIT_NOT_GREATER_THAN_ZERO" | "API_REP_MISSING" | "API_START_MISSING" | "CLIENT_BUILDER_AMOUNT_IS_ZERO" | "CLIENT_BUILDER_CANNOT_READ_BEFORE_RENDER" | "CLIENT_BUILDER_REQUIRES_PRIVATE_KEY" | "CLIENT_BUILDER_USER_CLIENT_REQUIRED" | "CLIENT_PUBLISH_AID_NOT_AVAILABLE" | "CLIENT_SIGNER_REQUIRES_PRIVATE_KEY" | "CLIENT_SYNC_PUBLISH_FAILED" | "CLIENT_SWAP_INVALID_ACCOUNT_OPTION" | "CLIENT_SWAP_OPTIONS_INVALID" | "CLIENT_SWAP_MISSING_SEND" | "CLIENT_SWAP_MISSING_RECEIVE" | "CLIENT_SWAP_SEND_RECEIVE_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_TOKEN_MISMATCH" | "CLIENT_SWAP_SEND_AMOUNT_TOO_LOW" | "CLIENT_SWAP_SEND_AMOUNT_RECEIVE_EXACT_MISMATCH" | "CLIENT_SWAP_REQUEST_TOKEN_MISMATCH" | "CLIENT_SWAP_REQUEST_AMOUNT_MISMATCH" | "KV_TTL_NOT_SUPPORTED" | "KV_KEY_ALREADY_EXISTS")[];
|
|
4
4
|
export type ErrorCode = typeof allFullErrorCodes[number];
|
|
5
5
|
export declare function ExpectErrorCode(code: ErrorCode, test: () => any): Promise<void>;
|
|
6
6
|
export declare class KeetaNetError extends KeetaNetErrorBase<ErrorCode> {
|