@keetanetwork/keetanet-client 0.12.2 → 0.14.0
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/api/index.d.ts +23 -2
- package/api/node.d.ts +7 -1
- package/api/p2p.d.ts +13 -0
- package/api/vote.d.ts +10 -0
- package/benchmarking/test.d.ts +4 -0
- package/client/builder.d.ts +6 -4
- package/client/client_common_tests.d.ts +18 -0
- package/client/index-browser.d.ts +42 -14
- package/client/index-browser.js +2068 -640
- package/client/index.d.ts +42 -14
- package/client/index.js +1964 -550
- package/config/index.d.ts +2 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/KeetaNetSDK.Client.html +14 -10
- package/docs/classes/KeetaNetSDK.Referenced.BaseSet.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.BaseVoteBuilder.html +10 -0
- package/docs/classes/KeetaNetSDK.Referenced.Block.html +9 -5
- package/docs/classes/KeetaNetSDK.Referenced.BlockBuilder.html +3 -2
- 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 +4 -4
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMANAGE_CERTIFICATE.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMODIFY_PERMISSIONS.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationRECEIVE.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSEND.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_INFO.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_REP.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_SUPPLY.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.Certificate.html +6 -2
- 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.IdentifierKey.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.IdentifierKeyPair.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.KeetaNetError.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 +5 -2
- package/docs/classes/KeetaNetSDK.Referenced.LedgerAtomicInterface.html +3 -1
- package/docs/classes/KeetaNetSDK.Referenced.P2PSwitch.html +6 -2
- package/docs/classes/KeetaNetSDK.Referenced.PermissionSetHolder.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.PossiblyExpiredVote.html +31 -27
- package/docs/classes/KeetaNetSDK.Referenced.SignatureStorage.html +1 -1
- package/docs/classes/KeetaNetSDK.Referenced.UserClientBuilder.html +4 -3
- package/docs/classes/KeetaNetSDK.Referenced.Vote.html +7 -3
- package/docs/classes/KeetaNetSDK.Referenced.VoteBlockBundle.html +3 -3
- package/docs/classes/KeetaNetSDK.Referenced.VoteBlockHash.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteBuilder.html +10 -8
- package/docs/classes/KeetaNetSDK.Referenced.VoteHash.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.VoteLikeBase.html +32 -0
- package/docs/classes/KeetaNetSDK.Referenced.VoteQuote.html +34 -0
- package/docs/classes/KeetaNetSDK.Referenced.VoteQuoteBuilder.html +11 -0
- package/docs/classes/KeetaNetSDK.Referenced.VoteStaple.html +3 -3
- package/docs/classes/KeetaNetSDK.Referenced.VoteStapleHash.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.html +2 -2
- package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_buffer.BufferStorage.html +1 -1
- package/docs/classes/KeetaNetSDK.UserClient.html +7 -2
- package/docs/enums/KeetaNetSDK.Referenced.BaseFlag.html +2 -1
- package/docs/enums/KeetaNetSDK.Referenced.BasePermissionGroup.html +3 -1
- package/docs/enums/KeetaNetSDK.Referenced.BlockPurpose.html +3 -0
- package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_helper.bufferToBigInt.html +1 -0
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/KeetaNetSDK.PublishOptions.html +5 -0
- 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.AccountInfo.html +4 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseExternalKeyPairFunctions.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseGenerationConfig.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierCreateArguments.html +3 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperation.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationCREATE_IDENTIFIER.html +3 -3
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATE.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATESerializable.html +1 -1
- 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.BlockCanonical.html → KeetaNetSDK.Referenced.BlockV1Canonical.html} +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1JSON.html +12 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1UnsignedCanonical.html +11 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2Canonical.html +11 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2JSON.html +12 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2UnsignedCanonical.html +11 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.ComputedBlocksEffectFields.html +3 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.Constructor.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.CreateIdentifierRequest.html +4 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.DisposableTimingHandle.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsNoEncryption.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsSupportsEncryption.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.InitialConfigSupply.html +1 -1
- 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 +5 -3
- package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStorageAPI.html +3 -3
- package/docs/interfaces/KeetaNetSDK.Referenced.ModifyTokenBalanceEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.MultiSigIdentifierCreateArguments.html +5 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.MultisigConfig.html +3 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.NumericValueEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.P2PConfig.html +4 -2
- 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 +4 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.PrincipalACLWithInfoParsed.html +1 -0
- package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStorage.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.RequestTokenReceiveEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.TokenNumericEntry.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.UserClientConfig.html +5 -3
- package/docs/interfaces/KeetaNetSDK.Referenced.UserClientOptions.html +4 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.VoteJSON.html +3 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.VoteStapleJSON.html +2 -2
- package/docs/interfaces/KeetaNetSDK.Referenced.WithIsInstance.html +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.src_config.ValidationConfig.html +2 -2
- 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_helper.InstanceSetConstructor.html +2 -2
- package/docs/modules/KeetaNetSDK.Referenced.html +1 -1
- package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_helper.html +1 -1
- package/docs/modules/KeetaNetSDK.html +2 -2
- package/docs/types/KeetaNetSDK.Referenced.BlockASN1SchemaWithoutSignature.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockJSON.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockJSONIncomplete.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.BlockOperationASN1SchemaType.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockOperationTypes.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockSignature.html +2 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockSignatureField.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockSignerField.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockSignerFieldJSON.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockV1ASN1WithoutSignature.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.BlockV2ASN1WithoutSignature.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.CertificateBuilderParams.html +8 -3
- package/docs/types/KeetaNetSDK.Referenced.ComputedEffectOfBlocks.html +2 -2
- package/docs/types/KeetaNetSDK.Referenced.GetAccountStateAPIResponseFormatted.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.HashNames.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.MultisigAddress.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.MultisigSignerField.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.MultisigSignerFieldJSON.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.OmitLastArrayValue.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.P2PUpdateOptions.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.UserEditableAccountInfo.html +1 -0
- package/docs/types/KeetaNetSDK.Referenced.src_config.NetworkConfig.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.Schema.html +1 -1
- package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.SchemaMap.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.BlockErrorCodes.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.BlockOperationASN1Schema.html +2 -0
- package/docs/variables/KeetaNetSDK.Referenced.LedgerErrorCodes.html +1 -1
- package/docs/variables/KeetaNetSDK.Referenced.VoteErrorCodes.html +1 -1
- package/lib/block/index.d.ts +104 -36
- package/lib/block/operations.d.ts +31 -3
- package/lib/error/block.d.ts +1 -1
- package/lib/error/ledger.d.ts +1 -1
- package/lib/error/vote.d.ts +1 -1
- package/lib/ledger/common.d.ts +14 -1
- package/lib/ledger/db_dynamodb.d.ts +2 -2
- package/lib/ledger/db_postgres.d.ts +1 -1
- package/lib/ledger/db_spanner.d.ts +1 -1
- package/lib/ledger/db_spanner_helper.d.ts +28 -5
- package/lib/ledger/db_sqlite.d.ts +1 -1
- package/lib/ledger/effects.d.ts +10 -9
- package/lib/ledger/index.d.ts +17 -8
- package/lib/ledger/types.d.ts +10 -1
- package/lib/node/utils.d.ts +5 -0
- package/lib/p2p.d.ts +32 -0
- package/lib/permissions.d.ts +5 -2
- package/lib/utils/asn1.d.ts +4 -4
- package/lib/utils/certificate.d.ts +38 -1
- package/lib/utils/helper.d.ts +2 -1
- package/lib/vote.d.ts +55 -20
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSON.html +0 -11
- package/docs/interfaces/KeetaNetSDK.Referenced.BlockUnsignedCanonical.html +0 -11
- package/docs/types/KeetaNetSDK.Referenced.CreateIdentifierRequest.html +0 -6
package/lib/block/index.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import type { GenericAccount } from '../account';
|
|
2
|
-
import Account from '../account';
|
|
1
|
+
import type { GenericAccount, MultisigAddress } from '../account';
|
|
2
|
+
import Account, { AccountKeyAlgorithm } from '../account';
|
|
3
3
|
import { BufferStorage } from '../utils/buffer';
|
|
4
4
|
import * as ASN1 from '../utils/asn1';
|
|
5
5
|
import type { ToJSONSerializable, ToJSONSerializableOptions } from '../utils/conversion';
|
|
6
6
|
import * as Operations from './operations';
|
|
7
|
+
export declare enum BlockPurpose {
|
|
8
|
+
GENERIC = 0,
|
|
9
|
+
FEE = 1
|
|
10
|
+
}
|
|
7
11
|
export declare enum AdjustMethod {
|
|
8
12
|
ADD = 0,
|
|
9
13
|
SUBTRACT = 1,
|
|
10
14
|
SET = 2
|
|
11
15
|
}
|
|
12
|
-
export declare function
|
|
16
|
+
export declare function toAdjustMethod(value: unknown): AdjustMethod;
|
|
13
17
|
type BlockHashString = string & {
|
|
14
18
|
readonly __blockhash: never;
|
|
15
19
|
};
|
|
@@ -41,8 +45,9 @@ type BlockSignature = Buffer;
|
|
|
41
45
|
/**
|
|
42
46
|
* Representation of the block
|
|
43
47
|
*/
|
|
44
|
-
export interface
|
|
48
|
+
export interface BlockV1JSON {
|
|
45
49
|
version: 1;
|
|
50
|
+
purpose?: BlockPurpose.GENERIC;
|
|
46
51
|
date: string | Date;
|
|
47
52
|
previous: string | BlockHash;
|
|
48
53
|
network: string | NetworkID;
|
|
@@ -52,16 +57,37 @@ export interface BlockJSON {
|
|
|
52
57
|
signature: string | BlockSignature;
|
|
53
58
|
operations: Operations.BlockJSONOperations[] | Operations.BlockOperations[];
|
|
54
59
|
}
|
|
55
|
-
export type
|
|
60
|
+
export type BlockV1JSONIncomplete = Partial<BlockV1JSON>;
|
|
56
61
|
/**
|
|
57
62
|
* Output of block suitable to JSON serialization
|
|
58
63
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Representation of the block V2
|
|
66
|
+
*/
|
|
67
|
+
export interface BlockV2JSON {
|
|
68
|
+
version: 2;
|
|
69
|
+
purpose: BlockPurpose;
|
|
70
|
+
date: string | Date;
|
|
71
|
+
previous: string | BlockHash;
|
|
72
|
+
network: string | NetworkID;
|
|
73
|
+
subnet?: string | SubnetID;
|
|
74
|
+
account: string | GenericAccount;
|
|
75
|
+
signer: BlockSignerFieldJSON;
|
|
76
|
+
signatures: (string | BlockSignature)[];
|
|
77
|
+
operations: (Operations.BlockJSONOperations | Operations.BlockOperations)[];
|
|
78
|
+
}
|
|
79
|
+
export type BlockV2JSONIncomplete = Partial<BlockV2JSON>;
|
|
80
|
+
export type BlockJSONOutput = ReturnType<Block['toJSON']>;
|
|
81
|
+
export type BlockJSONOutputSerialized = ToJSONSerializable<BlockJSONOutput>;
|
|
82
|
+
export type BlockJSONOutputIncomplete = Partial<BlockJSONOutputSerialized>;
|
|
83
|
+
export type BlockJSON = (Omit<BlockV1JSON, 'version'> | Omit<BlockV2JSON, 'version'>) & {
|
|
84
|
+
version: number;
|
|
85
|
+
};
|
|
86
|
+
export type BlockJSONIncomplete = Partial<BlockJSON>;
|
|
61
87
|
/**
|
|
62
88
|
* Map input to our values
|
|
63
89
|
*/
|
|
64
|
-
interface
|
|
90
|
+
interface BlockV1UnsignedCanonical {
|
|
65
91
|
version: 1;
|
|
66
92
|
date: Date;
|
|
67
93
|
previous: BlockHash;
|
|
@@ -70,17 +96,45 @@ interface BlockUnsignedCanonical {
|
|
|
70
96
|
operations: Operations.BlockOperations[];
|
|
71
97
|
network: NetworkID;
|
|
72
98
|
subnet: SubnetID | undefined;
|
|
73
|
-
signature
|
|
99
|
+
signature?: never;
|
|
74
100
|
}
|
|
75
|
-
interface
|
|
101
|
+
interface BlockV1Canonical extends Omit<BlockV1UnsignedCanonical, 'signature'> {
|
|
76
102
|
signature: BlockSignature;
|
|
77
103
|
}
|
|
78
|
-
|
|
104
|
+
interface BlockV2UnsignedCanonical {
|
|
105
|
+
version: 2;
|
|
106
|
+
date: Date;
|
|
107
|
+
purpose: BlockPurpose;
|
|
108
|
+
previous: BlockHash;
|
|
109
|
+
account: GenericAccount;
|
|
110
|
+
signer: BlockSignerField;
|
|
111
|
+
operations: Operations.BlockOperations[];
|
|
112
|
+
network: NetworkID;
|
|
113
|
+
subnet: SubnetID | undefined;
|
|
114
|
+
signatures?: never;
|
|
115
|
+
}
|
|
116
|
+
interface BlockV2Canonical extends Omit<BlockV2UnsignedCanonical, 'signatures'> {
|
|
117
|
+
signatures: BlockSignature[];
|
|
118
|
+
}
|
|
119
|
+
type OmitLastArrayValue<T> = Required<T> extends [...infer Head, any] ? Head : never;
|
|
120
|
+
type BlockV1ASN1WithoutSignature = ASN1.ValidateASN1.SchemaMap<OmitLastArrayValue<typeof BlockV1ASN1Schema>>;
|
|
121
|
+
type BlockV2ASN1WithoutSignature = ASN1.ValidateASN1.SchemaMap<OmitLastArrayValue<typeof BlockV2ASN1Schema.contains>>;
|
|
122
|
+
type MultisigSignerFieldJSON = [MultisigAddress | string, (MultisigSignerField | Account | string)[]];
|
|
123
|
+
type BlockSignerFieldJSON = Account | string | MultisigSignerFieldJSON;
|
|
124
|
+
type BlockASN1SchemaWithoutSignature = BlockV1ASN1WithoutSignature | {
|
|
125
|
+
type: 'context';
|
|
126
|
+
kind: 'explicit';
|
|
127
|
+
value: 1;
|
|
128
|
+
contains: BlockV2ASN1WithoutSignature;
|
|
129
|
+
};
|
|
130
|
+
type MultisigSignerField = [MultisigAddress, (MultisigSignerField | Account)[]];
|
|
131
|
+
type BlockSignerField = Account | [MultisigAddress, BlockSignerField[]];
|
|
132
|
+
type BlockSignatureField = [BlockSignature, ...BlockSignature[]];
|
|
79
133
|
/**
|
|
80
134
|
* Block: An item which contains a number of operations (transactions) which
|
|
81
135
|
* originated from an account at a particular instant
|
|
82
136
|
*/
|
|
83
|
-
export declare class Block implements
|
|
137
|
+
export declare class Block implements Omit<BlockV2Canonical, 'version'> {
|
|
84
138
|
#private;
|
|
85
139
|
static isInstance: (obj: any, strict?: boolean) => obj is Block;
|
|
86
140
|
static Hash: typeof BlockHash;
|
|
@@ -98,32 +152,41 @@ export declare class Block implements BlockCanonical {
|
|
|
98
152
|
};
|
|
99
153
|
static NO_PREVIOUS: string;
|
|
100
154
|
static AdjustMethod: typeof AdjustMethod;
|
|
155
|
+
static Purpose: typeof BlockPurpose;
|
|
101
156
|
static Builder: typeof BlockBuilder;
|
|
102
|
-
readonly version: 1;
|
|
157
|
+
readonly version: 1 | 2;
|
|
158
|
+
readonly purpose: BlockPurpose;
|
|
103
159
|
readonly date: Date;
|
|
104
160
|
readonly previous: BlockHash;
|
|
105
161
|
readonly account: GenericAccount;
|
|
106
|
-
readonly
|
|
107
|
-
readonly operations: BlockCanonical['operations'];
|
|
162
|
+
readonly operations: BlockV2Canonical['operations'];
|
|
108
163
|
readonly network: NetworkID;
|
|
109
164
|
readonly subnet: SubnetID | undefined;
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
165
|
+
readonly signer: BlockSignerField;
|
|
166
|
+
readonly signatures: BlockSignatureField;
|
|
167
|
+
get principal(): Account<AccountKeyAlgorithm.ECDSA_SECP256K1 | AccountKeyAlgorithm.ED25519 | AccountKeyAlgorithm.ECDSA_SECP256R1> | MultisigAddress;
|
|
112
168
|
readonly $opening: boolean;
|
|
113
|
-
static fromUnsignedJSON(input:
|
|
114
|
-
static isValidJSON(block:
|
|
115
|
-
|
|
169
|
+
static fromUnsignedJSON(input: BlockV1UnsignedCanonical | BlockV2UnsignedCanonical): Promise<Block>;
|
|
170
|
+
static isValidJSON<Version extends 1 | 2>(block: unknown, version?: Version): block is ({
|
|
171
|
+
1: BlockV1JSON;
|
|
172
|
+
2: BlockV2JSON;
|
|
173
|
+
}[Version]);
|
|
174
|
+
constructor(input: Buffer | ArrayBuffer | BlockJSON | BlockJSONOutput | BlockJSONOutputSerialized | Block | string);
|
|
116
175
|
static getAccountOpeningHash(account: GenericAccount): BlockHash;
|
|
117
|
-
toBytes(
|
|
118
|
-
protected static
|
|
176
|
+
toBytes(includeSignatures?: boolean): ArrayBuffer;
|
|
177
|
+
protected static getV1ASN1ContainerWithoutSignature(input: BlockV1UnsignedCanonical | BlockV1Canonical): BlockV1ASN1WithoutSignature;
|
|
178
|
+
protected static getV2ASN1ContainerWithoutSignature(input: BlockV2UnsignedCanonical | BlockV2Canonical): BlockV2ASN1WithoutSignature;
|
|
179
|
+
protected static getASN1ContainerWithoutSignature(input: BlockV1UnsignedCanonical | BlockV1Canonical | BlockV2UnsignedCanonical | BlockV2Canonical): BlockASN1SchemaWithoutSignature;
|
|
119
180
|
toJSON(options?: ToJSONSerializableOptions): {
|
|
120
181
|
$binary?: string;
|
|
121
|
-
|
|
182
|
+
signature?: string;
|
|
183
|
+
signatures?: string[];
|
|
184
|
+
version: 1 | 2;
|
|
122
185
|
date: Date;
|
|
123
186
|
previous: BlockHash;
|
|
124
187
|
account: GenericAccount;
|
|
125
|
-
|
|
126
|
-
|
|
188
|
+
purpose: BlockPurpose;
|
|
189
|
+
signer: Account | [MultisigAddress, any[]];
|
|
127
190
|
network: bigint;
|
|
128
191
|
subnet: bigint | undefined;
|
|
129
192
|
operations: Operations.ExportedJSONOperation[];
|
|
@@ -140,7 +203,7 @@ export declare class Block implements BlockCanonical {
|
|
|
140
203
|
*/
|
|
141
204
|
get hash(): BlockHash;
|
|
142
205
|
}
|
|
143
|
-
export declare class BlockBuilder
|
|
206
|
+
export declare class BlockBuilder {
|
|
144
207
|
#private;
|
|
145
208
|
static isInstance: (obj: any, strict?: boolean) => obj is BlockBuilder;
|
|
146
209
|
static OperationType: typeof Operations.OperationType;
|
|
@@ -157,32 +220,35 @@ export declare class BlockBuilder implements BlockJSONIncomplete {
|
|
|
157
220
|
MANAGE_CERTIFICATE: typeof Operations.BlockOperationMANAGE_CERTIFICATE;
|
|
158
221
|
};
|
|
159
222
|
static NO_PREVIOUS: string;
|
|
160
|
-
constructor(block?: BlockJSONIncomplete |
|
|
223
|
+
constructor(block?: BlockJSON | BlockJSONIncomplete | BlockJSONOutputSerialized | ReturnType<Block['toJSON']> | Block | ArrayBuffer | string);
|
|
161
224
|
protected get currentBlock(): Block | BlockJSONIncomplete;
|
|
162
225
|
protected get currentWIP(): BlockJSONIncomplete;
|
|
163
226
|
protected get currentBlockSealed(): Block;
|
|
164
227
|
toJSON(opts?: ToJSONSerializableOptions): {
|
|
165
228
|
$binary?: string;
|
|
166
|
-
|
|
229
|
+
signature?: string;
|
|
230
|
+
signatures?: string[];
|
|
231
|
+
version: 1 | 2;
|
|
167
232
|
date: Date;
|
|
168
233
|
previous: BlockHash;
|
|
169
234
|
account: GenericAccount;
|
|
170
|
-
|
|
171
|
-
|
|
235
|
+
purpose: BlockPurpose;
|
|
236
|
+
signer: Account | [MultisigAddress, any[]];
|
|
172
237
|
network: bigint;
|
|
173
238
|
subnet: bigint | undefined;
|
|
174
239
|
operations: Operations.ExportedJSONOperation[];
|
|
175
240
|
$hash: BlockHash;
|
|
176
241
|
$opening: boolean;
|
|
177
242
|
} | {
|
|
178
|
-
version:
|
|
243
|
+
version: number | undefined;
|
|
179
244
|
date: Date | undefined;
|
|
180
245
|
previous: BlockHash | undefined;
|
|
181
246
|
account: GenericAccount | undefined;
|
|
182
|
-
signer:
|
|
247
|
+
signer: BlockSignerFieldJSON | undefined;
|
|
183
248
|
network: bigint | undefined;
|
|
184
249
|
subnet: bigint | undefined;
|
|
185
250
|
operations: Operations.BlockOperations[] | undefined;
|
|
251
|
+
purpose: BlockPurpose;
|
|
186
252
|
$opening: boolean | undefined;
|
|
187
253
|
};
|
|
188
254
|
seal(): Promise<Block>;
|
|
@@ -190,8 +256,8 @@ export declare class BlockBuilder implements BlockJSONIncomplete {
|
|
|
190
256
|
get sealed(): boolean;
|
|
191
257
|
get block(): Block | undefined;
|
|
192
258
|
get hash(): BlockHash | undefined;
|
|
193
|
-
set signer(signer:
|
|
194
|
-
get signer():
|
|
259
|
+
set signer(signer: BlockV2JSONIncomplete['signer'] | BlockV2JSON['signer']);
|
|
260
|
+
get signer(): BlockV2JSON['signer'] | undefined;
|
|
195
261
|
set account(account: string | GenericAccount | undefined);
|
|
196
262
|
get account(): GenericAccount | undefined;
|
|
197
263
|
set previous(blockhash: string | BlockHash | undefined);
|
|
@@ -199,8 +265,10 @@ export declare class BlockBuilder implements BlockJSONIncomplete {
|
|
|
199
265
|
get $opening(): boolean | undefined;
|
|
200
266
|
set date(date: Date | string | undefined);
|
|
201
267
|
get date(): Date | undefined;
|
|
202
|
-
set version(version:
|
|
203
|
-
get version():
|
|
268
|
+
set version(version: number | undefined);
|
|
269
|
+
get version(): number | undefined;
|
|
270
|
+
set purpose(purpose: BlockPurpose | undefined);
|
|
271
|
+
get purpose(): BlockPurpose;
|
|
204
272
|
set network(network: NetworkID | string | undefined);
|
|
205
273
|
get network(): NetworkID | undefined;
|
|
206
274
|
set subnet(subnet: SubnetID | string | undefined);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ValidateASN1 } from '../utils/asn1';
|
|
2
2
|
import type { DeepMutable } from '../utils/helper';
|
|
3
|
-
import type { GenericAccount, IdentifierAddress, TokenAddress, TokenPublicKeyString } from '../account';
|
|
4
|
-
import Account from '../account';
|
|
3
|
+
import type { GenericAccount, IdentifierAddress, IdentifierKeyAlgorithm, TokenAddress, TokenPublicKeyString } from '../account';
|
|
4
|
+
import Account, { AccountKeyAlgorithm } from '../account';
|
|
5
5
|
import type { AcceptedPermissionTypes } from '../permissions';
|
|
6
6
|
import { Permissions } from '../permissions';
|
|
7
7
|
import type { ToJSONSerializable } from '../utils/conversion';
|
|
8
8
|
import Block, { AdjustMethod } from '.';
|
|
9
9
|
import { Certificate, CertificateBundle, CertificateHash } from '../utils/certificate';
|
|
10
|
+
import type { MultisigConfig } from '../ledger/types';
|
|
10
11
|
/**
|
|
11
12
|
* All supported operations
|
|
12
13
|
*/
|
|
@@ -110,6 +111,20 @@ declare const BlockOperationASN1SchemaBase: {
|
|
|
110
111
|
readonly CREATE_IDENTIFIER: [{
|
|
111
112
|
readonly name: "identifier";
|
|
112
113
|
readonly schema: typeof ValidateASN1.IsOctetString;
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "createArguments";
|
|
116
|
+
readonly schema: {
|
|
117
|
+
readonly optional: {
|
|
118
|
+
readonly choice: [{
|
|
119
|
+
readonly type: "context";
|
|
120
|
+
readonly kind: "explicit";
|
|
121
|
+
readonly value: 7;
|
|
122
|
+
readonly contains: readonly [{
|
|
123
|
+
readonly sequenceOf: typeof ValidateASN1.IsOctetString;
|
|
124
|
+
}, typeof ValidateASN1.IsInteger];
|
|
125
|
+
}];
|
|
126
|
+
};
|
|
127
|
+
};
|
|
113
128
|
}];
|
|
114
129
|
readonly TOKEN_ADMIN_SUPPLY: [{
|
|
115
130
|
readonly name: "amount";
|
|
@@ -264,9 +279,16 @@ declare class BlockOperationSET_REP extends BlockOperation implements BlockJSONO
|
|
|
264
279
|
/**
|
|
265
280
|
* TokenCreate Operation
|
|
266
281
|
*/
|
|
282
|
+
interface BaseIdentifierCreateArguments<KeyType extends IdentifierKeyAlgorithm> {
|
|
283
|
+
type: KeyType;
|
|
284
|
+
}
|
|
285
|
+
interface MultiSigIdentifierCreateArguments extends BaseIdentifierCreateArguments<AccountKeyAlgorithm.MULTISIG>, MultisigConfig {
|
|
286
|
+
}
|
|
287
|
+
export type IdentifierCreateArguments = MultiSigIdentifierCreateArguments;
|
|
267
288
|
export interface BlockJSONOperationCREATE_IDENTIFIER extends BlockJSONOperation {
|
|
268
289
|
type: OperationType.CREATE_IDENTIFIER;
|
|
269
290
|
identifier: IdentifierAddress | string;
|
|
291
|
+
createArguments?: ToJSONSerializable<IdentifierCreateArguments> | IdentifierCreateArguments;
|
|
270
292
|
}
|
|
271
293
|
declare class BlockOperationCREATE_IDENTIFIER extends BlockOperation implements BlockJSONOperationCREATE_IDENTIFIER {
|
|
272
294
|
#private;
|
|
@@ -275,6 +297,8 @@ declare class BlockOperationCREATE_IDENTIFIER extends BlockOperation implements
|
|
|
275
297
|
constructor(input: BlockJSONOperationCREATE_IDENTIFIER);
|
|
276
298
|
set identifier(identifier: string | IdentifierAddress);
|
|
277
299
|
get identifier(): IdentifierAddress;
|
|
300
|
+
set createArguments(input: IdentifierCreateArguments | ToJSONSerializable<IdentifierCreateArguments> | undefined);
|
|
301
|
+
get createArguments(): IdentifierCreateArguments | undefined;
|
|
278
302
|
validate(context: BlockOperationValidateContext): void;
|
|
279
303
|
toJSON(): BlockJSONOperationCREATE_IDENTIFIER;
|
|
280
304
|
}
|
|
@@ -441,7 +465,11 @@ export declare function ExportBlockOperations(operations: BlockOperations[]): ((
|
|
|
441
465
|
value: OperationType.MODIFY_PERMISSIONS;
|
|
442
466
|
kind: "explicit";
|
|
443
467
|
}) | (Omit<import("../utils/asn1").ASN1ContextTag, "kind" | "value" | "contains"> & {
|
|
444
|
-
contains: [Buffer
|
|
468
|
+
contains: [Buffer, (Omit<import("../utils/asn1").ASN1ContextTag, "kind" | "value" | "contains"> & {
|
|
469
|
+
contains: [Buffer[], bigint];
|
|
470
|
+
value: 7;
|
|
471
|
+
kind: "explicit";
|
|
472
|
+
}) | undefined];
|
|
445
473
|
value: OperationType.CREATE_IDENTIFIER;
|
|
446
474
|
kind: "explicit";
|
|
447
475
|
}) | (Omit<import("../utils/asn1").ASN1ContextTag, "kind" | "value" | "contains"> & {
|
package/lib/error/block.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeetaNetError } from '.';
|
|
2
2
|
declare const BlockErrorType: "BLOCK";
|
|
3
|
-
declare const BlockErrorCodes: readonly ["INVALID_TYPE", "INVALID_VERSION", "NO_MULTIPLE_SET_REP", "IDENTIFIER_NEED_DEFAULT_PERMISSIONS", "CANNOT_SEND_NON_TOKEN", "TOKEN_RECEIVE_DIFFERS", "ONLY_TOKEN_OP", "ONLY_IDENTIFIER_OP", "NO_TOKEN_OP", "NO_IDENTIFIER_OP", "NO_MULTISIG_OP", "IDENTIFIER_INVALID", "GENERAL_FIELD_INVALID", "PERMISSIONS_INVALID_DEFAULT", "PERMISSIONS_INVALID_ENTITY", "PERMISSIONS_INVALID_PRINCIPAL", "PERMISSIONS_INVALID_TARGET", "INVALID_ACCOUNT_TYPE", "NO_ADMIN_ON_TARGET", "PREVIOUS_SELF", "NO_DELEGATE_ADMIN", "NO_MODIFY_PERMISSION_DUPE", "CANNOT_FORWARD_TO_SELF", "EXACT_TRUE_WHEN_FORWARDING", "CERTIFICATE_SUBJECT_MISMATCH", "NO_DUPLICATE_CERTIFICATE_OPERATION", "INTERMEDIATE_CERTIFICATES_ONLY_ADD", "INVALID_CERTIFICATE_VALUE", "EXTERNAL_TOO_LONG", "EXTERNAL_INVALID", "EXTERNAL_MISSING", "SUPPLY_INVALID"];
|
|
3
|
+
declare const BlockErrorCodes: readonly ["INVALID_TYPE", "INVALID_VERSION", "NO_MULTIPLE_SET_REP", "IDENTIFIER_NEED_DEFAULT_PERMISSIONS", "CANNOT_SEND_NON_TOKEN", "TOKEN_RECEIVE_DIFFERS", "ONLY_TOKEN_OP", "ONLY_IDENTIFIER_OP", "NO_TOKEN_OP", "NO_IDENTIFIER_OP", "INVALID_SIGNER", "INVALID_PURPOSE_VALIDATION", "INVALID_MULTISIG_QUORUM", "INVALID_MULTISIG_SIGNER_DEPTH", "INVALID_MULTISIG_SIGNER_COUNT", "INVALID_MULTISIG_SIGNER_DUPLICATE", "INVALID_CREATE_IDENTIFIER_ARGS", "NO_MULTISIG_OP", "IDENTIFIER_INVALID", "GENERAL_FIELD_INVALID", "PERMISSIONS_INVALID_DEFAULT", "PERMISSIONS_INVALID_ENTITY", "PERMISSIONS_INVALID_PRINCIPAL", "PERMISSIONS_INVALID_TARGET", "INVALID_ACCOUNT_TYPE", "NO_ADMIN_ON_TARGET", "PREVIOUS_SELF", "NO_DELEGATE_ADMIN", "NO_MODIFY_PERMISSION_DUPE", "CANNOT_FORWARD_TO_SELF", "EXACT_TRUE_WHEN_FORWARDING", "CERTIFICATE_SUBJECT_MISMATCH", "NO_DUPLICATE_CERTIFICATE_OPERATION", "INTERMEDIATE_CERTIFICATES_ONLY_ADD", "INVALID_CERTIFICATE_VALUE", "EXTERNAL_TOO_LONG", "EXTERNAL_INVALID", "EXTERNAL_MISSING", "SUPPLY_INVALID"];
|
|
4
4
|
export type BlockErrorCode = `${typeof BlockErrorType}_${typeof BlockErrorCodes[number]}`;
|
|
5
5
|
export default class KeetaNetBlockError extends KeetaNetError {
|
|
6
6
|
static isInstance: (obj: any, strict?: boolean) => obj is KeetaNetBlockError;
|
package/lib/error/ledger.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeetaNetError } from '.';
|
|
2
2
|
declare const LedgerErrorType: "LEDGER";
|
|
3
|
-
declare const LedgerErrorCodes: readonly ["TRANSACTION_ABORTED", "INVALID_CHAIN", "INVALID_NETWORK", "INVALID_SUBNET", "NOT_EMPTY", "NOT_OPENING", "NOT_SUCCESSOR", "INVALID_PERMISSIONS", "INVALID_OWNER_COUNT", "INVALID_BALANCE", "PREVIOUS_ALREADY_USED", "PREVIOUS_NOT_SEEN", "SUCCESSOR_VOTE_EXISTS", "INSUFFICIENT_VOTING_WEIGHT", "INVALID_ACCOUNT_INFO_KEY", "RECEIVE_NOT_MET", "DUPLICATE_VOTE_FOUND", "CANNOT_EXCHANGE_PERM_VOTE", "BLOCKS_DIFFER_FROM_VOTED_ON", "NO_PERM_WITHOUT_SELF_TEMP", "DUPLICATE_VOTE_ISSUER_FOUND", "OTHER"];
|
|
3
|
+
declare const LedgerErrorCodes: readonly ["TRANSACTION_ABORTED", "INVALID_CHAIN", "INVALID_NETWORK", "INVALID_SUBNET", "NOT_EMPTY", "NOT_OPENING", "NOT_SUCCESSOR", "INVALID_PERMISSIONS", "INVALID_OWNER_COUNT", "INVALID_BALANCE", "PREVIOUS_ALREADY_USED", "PREVIOUS_NOT_SEEN", "SUCCESSOR_VOTE_EXISTS", "INSUFFICIENT_VOTING_WEIGHT", "INVALID_ACCOUNT_INFO_KEY", "RECEIVE_NOT_MET", "DUPLICATE_VOTE_FOUND", "CANNOT_EXCHANGE_PERM_VOTE", "BLOCKS_DIFFER_FROM_VOTED_ON", "NO_PERM_WITHOUT_SELF_TEMP", "DUPLICATE_VOTE_ISSUER_FOUND", "OTHER", "MISSING_BLOCKS", "FEE_AMOUNT_MISMATCH", "FEE_TOKEN_MISMATCH", "FEE_MISSING", "MISSING_REQUIRED_FEE_BLOCK", "PERM_VOTE_WITH_QUOTE", "QUOTE_MISMATCH", "REQUIRED_FEE_MISMATCH"];
|
|
4
4
|
export type LedgerErrorCode = `${typeof LedgerErrorType}_${typeof LedgerErrorCodes[number]}`;
|
|
5
5
|
export declare class KeetaNetLedgerError extends KeetaNetError {
|
|
6
6
|
static isInstance: (obj: any, strict?: boolean) => obj is KeetaNetLedgerError;
|
package/lib/error/vote.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeetaNetError } from '.';
|
|
2
2
|
declare const VoteErrorType: "VOTE";
|
|
3
|
-
declare const VoteErrorCodes: readonly ["SERIAL_MISMATCH", "INVALID_VERSION", "INVALID_CONSTRUCTION", "INVALID_CONSTRUCTION_JSON", "SIGNATURE_INVALID", "EXPIRED", "INVALID_VALIDITY", "MOMENT_BEFORE_VALIDITY_FROM", "STAPLE_INVALID_CONSTRUCTION", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_COUNT", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_MISSING", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_ORDER", "STAPLE_DUPLICATE_VOTE_ISSUER", "STAPLE_PERMANENCE_MISMATCH", "BUILDER_INVALID_CONSTRUCTION", "BUILDER_INVALID_BLOCK_TYPE", "BUILDER_INVALID_SERIAL", "BUILDER_INVALID_VALID_TO_FROM", "MALFORMED_WRAPPER", "MALFORMED_VOTE_WRAPPER", "MALFORMED_VOTE_CONTENT", "MALFORMED_VOTE_CONTENT_EXTRA_DATA", "MALFORMED_VOTE_VERSION", "MALFORMED_VOTE_SERIAL", "MALFORMED_VOTE_SIGNATURE_INFORMATION", "MALFORMED_VOTE_ISSUER_INFORMATION", "MALFORMED_VOTE_SUBJECT_INFORMATION", "MALFORMED_VOTE_VALIDITY_INFORMATION", "MALFORMED_VOTE_SERIAL", "MALFORMED_VOTE_EXTENSIONS", "MALFORMED_VOTE_EXTENSIONS_DATA", "MALFORMED_VOTE_EXTENSIONS_VALUE", "MALFORMED_VOTE_EXTENSIONS_VALUE_OID", "MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL", "MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL_TYPE", "MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_ISSUER", "MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_WRAPPER", "MALFORMED_VOTE_SIGNATURE_SCHEME_ECDSA_INVALID_CURVE", "MALFORMED_VOTE_SIGNATURE_UNSUPPORTED_SCHEME", "MALFORMED_VOTE_SUBJECT_PUBLIC_KEY_INFORMATION", "MALFORMED_VOTE_SIGNATURE_VALUE", "MALFORMED_VOTE_NO_BLOCKS_FOUND", "MALFORMED_STAPLE", "MALFORMED_STAPLE_BLOCKS", "MALFORMED_STAPLE_BLOCKS_AT_LEAST_ONE", "MALFORMED_STAPLE_VOTES", "MALFORMED_STAPLE_VOTES_AT_LEAST_ONE", "MALFORMED_FIND_RDN_INVALID_TYPE", "MALFORMED_FIND_RDN_MUST_HAVE_ONE", "MALFORMED_FIND_RDN_PART_WELL_FORMED", "MALFORMED_FIND_RDN_MUST_BE_SET", "MALFORMED_FIND_RDN_TYPE_MUST_BE_OID", "MALFORMED_HASHES_FROM_VOTE_INVALID_INPUT", "MALFORMED_HASHES_FROM_VOTE_INVALID_TYPE", "MALFORMED_HASHES_FROM_VOTE_INVALID_CONTEXT_SPECIFIC", "MALFORMED_HASHES_FROM_VOTE_DATA_NEEDS_OID", "MALFORMED_HASHES_FROM_VOTE_DATA_HASH_DATA_MUST_BE_SEQUENCE", "MALFORMED_HASHES_FROM_VOTE_DATA_NOT_TWO_ITEMS", "MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_FUNC", "MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_TYPE", "MALFORMED_HASHES_FROM_VOTE_DATA_SECOND_MUST_BE_SEQUENCE", "MALFORMED_FEES_AMOUNT", "MALFORMED_FEES_FROM_VOTE_INVALID_INPUT", "MALFORMED_FEES_IN_PERMANENT_VOTE", "MALFORMED_FEES_PAY_TO_INVALID", "MALFORMED_FEES_TOKEN_NOT_TOKEN"];
|
|
3
|
+
declare const VoteErrorCodes: readonly ["SERIAL_MISMATCH", "INVALID_VERSION", "INVALID_CONSTRUCTION", "INVALID_CONSTRUCTION_JSON", "SIGNATURE_INVALID", "EXPIRED", "INVALID_VALIDITY", "MOMENT_BEFORE_VALIDITY_FROM", "STAPLE_INVALID_CONSTRUCTION", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_COUNT", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_MISSING", "STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_ORDER", "STAPLE_DUPLICATE_VOTE_ISSUER", "STAPLE_PERMANENCE_MISMATCH", "BUILDER_INVALID_CONSTRUCTION", "BUILDER_INVALID_BLOCK_TYPE", "BUILDER_INVALID_SERIAL", "BUILDER_INVALID_VALID_TO_FROM", "MALFORMED_WRAPPER", "MALFORMED_VOTE_WRAPPER", "MALFORMED_VOTE_CONTENT", "MALFORMED_VOTE_CONTENT_EXTRA_DATA", "MALFORMED_VOTE_VERSION", "MALFORMED_VOTE_SERIAL", "MALFORMED_VOTE_SIGNATURE_INFORMATION", "MALFORMED_VOTE_ISSUER_INFORMATION", "MALFORMED_VOTE_SUBJECT_INFORMATION", "MALFORMED_VOTE_VALIDITY_INFORMATION", "MALFORMED_VOTE_SERIAL", "MALFORMED_VOTE_EXTENSIONS", "MALFORMED_VOTE_EXTENSIONS_DATA", "MALFORMED_VOTE_EXTENSIONS_VALUE", "MALFORMED_VOTE_EXTENSIONS_VALUE_OID", "MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL", "MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL_TYPE", "MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_ISSUER", "MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_WRAPPER", "MALFORMED_VOTE_SIGNATURE_SCHEME_ECDSA_INVALID_CURVE", "MALFORMED_VOTE_SIGNATURE_UNSUPPORTED_SCHEME", "MALFORMED_VOTE_SUBJECT_PUBLIC_KEY_INFORMATION", "MALFORMED_VOTE_SIGNATURE_VALUE", "MALFORMED_VOTE_NO_BLOCKS_FOUND", "MALFORMED_STAPLE", "MALFORMED_STAPLE_BLOCKS", "MALFORMED_STAPLE_BLOCKS_AT_LEAST_ONE", "MALFORMED_STAPLE_VOTES", "MALFORMED_STAPLE_VOTES_AT_LEAST_ONE", "MALFORMED_FIND_RDN_INVALID_TYPE", "MALFORMED_FIND_RDN_MUST_HAVE_ONE", "MALFORMED_FIND_RDN_PART_WELL_FORMED", "MALFORMED_FIND_RDN_MUST_BE_SET", "MALFORMED_FIND_RDN_TYPE_MUST_BE_OID", "MALFORMED_HASHES_FROM_VOTE_INVALID_INPUT", "MALFORMED_HASHES_FROM_VOTE_INVALID_TYPE", "MALFORMED_HASHES_FROM_VOTE_INVALID_CONTEXT_SPECIFIC", "MALFORMED_HASHES_FROM_VOTE_DATA_NEEDS_OID", "MALFORMED_HASHES_FROM_VOTE_DATA_HASH_DATA_MUST_BE_SEQUENCE", "MALFORMED_HASHES_FROM_VOTE_DATA_NOT_TWO_ITEMS", "MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_FUNC", "MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_TYPE", "MALFORMED_HASHES_FROM_VOTE_DATA_SECOND_MUST_BE_SEQUENCE", "MALFORMED_FEES_AMOUNT", "MALFORMED_FEES_FROM_VOTE_INVALID_INPUT", "MALFORMED_FEES_IN_PERMANENT_VOTE", "MALFORMED_FEES_PAY_TO_INVALID", "MALFORMED_FEES_TOKEN_NOT_TOKEN", "FEE_IS_QUOTE", "FEE_QUOTE_MISSING_FEES", "FEE_NOT_QUOTE", "MALFORMED_FEES_KIND_MISSING", "MALFORMED_FEES_QUOTE_INVALID"];
|
|
4
4
|
export type VoteErrorCode = `${typeof VoteErrorType}_${typeof VoteErrorCodes[number]}`;
|
|
5
5
|
export default class KeetaNetVoteError extends KeetaNetError {
|
|
6
6
|
static isInstance: (obj: any, strict?: boolean) => obj is KeetaNetVoteError;
|
package/lib/ledger/common.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ interface ComputeLedgerEffectOptions<T extends boolean, P extends boolean, W ext
|
|
|
57
57
|
baseToken: TokenAddress;
|
|
58
58
|
}
|
|
59
59
|
export declare function validateSupply(amount: bigint, network: bigint): void;
|
|
60
|
+
export declare function validateBlockSignerCount(amount: bigint, network: bigint): void;
|
|
61
|
+
export declare function validateBlockSignerDepth(depth: bigint, network: bigint): void;
|
|
60
62
|
/**
|
|
61
63
|
* Compute effects on the ledger from block effects
|
|
62
64
|
*/
|
|
@@ -87,6 +89,7 @@ type AccountInfoUnparsedRow = {
|
|
|
87
89
|
description?: string;
|
|
88
90
|
metadata?: string;
|
|
89
91
|
supply?: bigint | string;
|
|
92
|
+
multisigQuorum?: bigint | string;
|
|
90
93
|
defaultBasePermission?: string | bigint | BaseSet;
|
|
91
94
|
defaultExternalPermission?: string | bigint | ExternalSet;
|
|
92
95
|
};
|
|
@@ -116,10 +119,20 @@ export declare abstract class LedgerStorageBase {
|
|
|
116
119
|
}>;
|
|
117
120
|
_formatAccountInfoFromRow(account: GenericAccount, row?: AccountInfoUnparsedRow | undefined): AccountInfo;
|
|
118
121
|
_validateAccountInfoKeys(account: GenericAccount, info: Partial<AccountInfo>): void;
|
|
122
|
+
/**
|
|
123
|
+
* @param moment - The date to use as the base for the timestamp.
|
|
124
|
+
* @param momentBits - The number of bits to use for the timestamp
|
|
125
|
+
* @param totalLength - The total length of the generated number in bits
|
|
126
|
+
* @param randomData - A hexadecimal string to use as the random data.
|
|
127
|
+
* @param timestampFuzzMS - The number of milliseconds to fuzz the timestamp by, defaults to 1n (precise).
|
|
128
|
+
* @param optimistic - If true, the timestamp will be incremented by 1 quanta, defaults to false.
|
|
129
|
+
* @returns A bigint representing the noisy timestamp.
|
|
130
|
+
*/
|
|
131
|
+
_generateNoisyTimestamp(moment: Date, momentBits: bigint, totalLength: bigint, randomData: Buffer, timestampFuzzMS?: number | bigint, optimistic?: boolean): bigint;
|
|
119
132
|
getHeadBlock(transaction: any, account: GenericAccount, from: LedgerSelector): Promise<Block | null>;
|
|
120
133
|
getVotesFromPrevious(transaction: any, prevBlock: BlockHash, from: LedgerSelector, issuer?: Account): Promise<Vote[] | null>;
|
|
121
134
|
protected abstract gcBatch(transaction: any): Promise<boolean>;
|
|
122
|
-
gc(transaction: any): Promise<boolean>;
|
|
135
|
+
gc(transaction: any, timeLimitMS?: number): Promise<boolean>;
|
|
123
136
|
}
|
|
124
137
|
export declare function assertLedgerStorage(value: string): LedgerStorage;
|
|
125
138
|
export {};
|
|
@@ -41,7 +41,7 @@ declare class DynamoDBTransaction implements LedgerStorageTransactionBase {
|
|
|
41
41
|
getBlockHeight(blockHash: BlockHash, account: GenericAccount): Promise<bigint | null>;
|
|
42
42
|
getVotes(block: BlockHash, from: LedgerSelector, issuer?: Account, transactionAlreadyVerifiedActiveByCaller?: boolean): Promise<Vote[] | null>;
|
|
43
43
|
getVoteStaple(stapleBlockHashes: VoteBlockHash[], from?: LedgerSelector): Promise<VoteBlockHashMap<VoteStaple | null>>;
|
|
44
|
-
getHistory(account: GenericAccount, start: VoteBlockHash | null, limit: number): Promise<VoteBlockHash[]>;
|
|
44
|
+
getHistory(account: GenericAccount | null, start: VoteBlockHash | null, limit: number): Promise<VoteBlockHash[]>;
|
|
45
45
|
getVotesFromMultiplePrevious(prevBlocks: BlockHash[], from: LedgerSelector, issuer?: Account): Promise<{
|
|
46
46
|
[hash: string]: Vote[] | null;
|
|
47
47
|
}>;
|
|
@@ -86,7 +86,7 @@ export declare class DBDynamoDB extends LedgerStorageBase implements LedgerStora
|
|
|
86
86
|
getBlockHeight(transaction: DynamoDBTransaction, blockHash: BlockHash, account: GenericAccount): Promise<bigint | null>;
|
|
87
87
|
getVotes(transaction: DynamoDBTransaction, block: BlockHash, from: LedgerSelector): Promise<Vote[] | null>;
|
|
88
88
|
getVoteStaples(transaction: DynamoDBTransaction, stapleBlockHashes: VoteBlockHash[], from?: LedgerSelector): Promise<VoteBlockHashMap<VoteStaple | null>>;
|
|
89
|
-
getHistory(transaction: DynamoDBTransaction, account: GenericAccount, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
89
|
+
getHistory(transaction: DynamoDBTransaction, account: GenericAccount | null, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
90
90
|
getVotesFromMultiplePrevious(transaction: DynamoDBTransaction, prevBlocks: BlockHash[], from: LedgerSelector, issuer?: Account): Promise<{
|
|
91
91
|
[hash: string]: Vote[] | null;
|
|
92
92
|
}>;
|
|
@@ -47,7 +47,7 @@ export declare class DBPostgres extends LedgerStorageBase implements LedgerStora
|
|
|
47
47
|
getBlockHeight(transaction: PostgresTransaction, blockHash: BlockHash, account: GenericAccount): Promise<bigint | null>;
|
|
48
48
|
getVotes(transaction: PostgresTransaction, block: BlockHash, from: LedgerSelector, issuer?: GenericAccount): Promise<Vote[] | null>;
|
|
49
49
|
getVoteStaples(transaction: PostgresTransaction, stapleBlockHashes: VoteBlockHash[], from?: LedgerSelector): Promise<VoteBlockHashMap<VoteStaple | null>>;
|
|
50
|
-
getHistory(transaction: PostgresTransaction, account: GenericAccount, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
50
|
+
getHistory(transaction: PostgresTransaction, account: GenericAccount | null, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
51
51
|
getBlockFromPrevious(transaction: PostgresTransaction, prevBlock: BlockHash, from: LedgerSelector): Promise<Block | null>;
|
|
52
52
|
getVotesFromMultiplePrevious(transaction: PostgresTransaction, prevBlocks: BlockHash[], from: LedgerSelector, issuer?: Account): Promise<{
|
|
53
53
|
[hash: string]: Vote[] | null;
|
|
@@ -93,7 +93,7 @@ export declare class DBSpanner extends LedgerStorageBase implements LedgerStorag
|
|
|
93
93
|
getBlockHeight(transaction: SpannerTransaction, blockHash: BlockHash, account: GenericAccount): Promise<bigint | null>;
|
|
94
94
|
getVotes(transaction: SpannerTransaction, blockHash: BlockHash, from: LedgerSelector): Promise<Vote[] | null>;
|
|
95
95
|
getVoteStaples(transaction: SpannerTransaction, stapleBlockHashes: VoteBlockHash[], from?: LedgerSelector): Promise<VoteBlockHashMap<VoteStaple | null>>;
|
|
96
|
-
getHistory(transaction: SpannerTransaction, account: GenericAccount, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
96
|
+
getHistory(transaction: SpannerTransaction, account: GenericAccount | null, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
97
97
|
getBlockFromPrevious(transaction: SpannerTransaction, prevBlock: BlockHash, from: LedgerSelector): Promise<Block | null>;
|
|
98
98
|
getVotesFromMultiplePrevious(transaction: SpannerTransaction, prevBlocks: BlockHash[], from: LedgerSelector, issuer?: Account): Promise<{
|
|
99
99
|
[hash: string]: Vote[] | null;
|
|
@@ -184,7 +184,21 @@ declare const ColumnTypes: {
|
|
|
184
184
|
fromSpanner: (pubKey: string) => GenericAccount;
|
|
185
185
|
toSpanner: (account: GenericAccount) => import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
|
|
186
186
|
};
|
|
187
|
-
readonly
|
|
187
|
+
readonly BUFFER_BIGINT_39: {
|
|
188
|
+
dbType: string;
|
|
189
|
+
dbSize: string;
|
|
190
|
+
toSpanner: (buf: bigint) => Buffer;
|
|
191
|
+
fromSpanner: (value: Buffer) => bigint;
|
|
192
|
+
toComparable: (val: Buffer | bigint | string) => bigint;
|
|
193
|
+
};
|
|
194
|
+
readonly BUFFER_BIGINT_16: {
|
|
195
|
+
dbType: string;
|
|
196
|
+
dbSize: string;
|
|
197
|
+
toSpanner: (buf: bigint) => Buffer;
|
|
198
|
+
fromSpanner: (value: Buffer) => bigint;
|
|
199
|
+
toComparable: (val: Buffer | bigint | string) => bigint;
|
|
200
|
+
};
|
|
201
|
+
readonly BUFFER_BIGINT_8: {
|
|
188
202
|
dbType: string;
|
|
189
203
|
dbSize: string;
|
|
190
204
|
toSpanner: (buf: bigint) => Buffer;
|
|
@@ -231,6 +245,7 @@ declare const schema: {
|
|
|
231
245
|
readonly description: ColumnInterface<"INFO_DESCRIPTION", true>;
|
|
232
246
|
readonly metadata: ColumnInterface<"INFO_METADATA", true>;
|
|
233
247
|
readonly supply: ColumnInterface<"SUPPLY", true>;
|
|
248
|
+
readonly multisigQuorum: ColumnInterface<"BIGINT", true>;
|
|
234
249
|
readonly defaultBasePermission: ColumnInterface<"BASE_PERMISSION", true>;
|
|
235
250
|
readonly defaultExternalPermission: ColumnInterface<"EXTERNAL_PERMISSION", true>;
|
|
236
251
|
};
|
|
@@ -274,7 +289,7 @@ declare const schema: {
|
|
|
274
289
|
readonly columns: {
|
|
275
290
|
readonly account: ColumnInterface<"GENERIC_ACCOUNT", false>;
|
|
276
291
|
readonly voteBlockHash: ColumnInterface<"VOTEBLOCKHASH", false>;
|
|
277
|
-
readonly orderIndex: ColumnInterface<"
|
|
292
|
+
readonly orderIndex: ColumnInterface<"BUFFER_BIGINT_39", false>;
|
|
278
293
|
};
|
|
279
294
|
readonly key: readonly [Key, Key];
|
|
280
295
|
readonly interleave: Interleave;
|
|
@@ -295,9 +310,10 @@ declare const schema: {
|
|
|
295
310
|
readonly onLedger: ColumnInterface<"LEDGER", false>;
|
|
296
311
|
readonly vote: ColumnInterface<"VOTE", false>;
|
|
297
312
|
readonly timestamp: ColumnInterface<"TIMESTAMP", false>;
|
|
298
|
-
readonly expires: ColumnInterface<"TIMESTAMP", false>;
|
|
299
313
|
readonly issuer: ColumnInterface<"ACCOUNT", false>;
|
|
300
314
|
readonly voteBlockHash: ColumnInterface<"VOTEBLOCKHASH", false>;
|
|
315
|
+
readonly orderIndex: ColumnInterface<"BUFFER_BIGINT_16", false>;
|
|
316
|
+
readonly expiresIndex: ColumnInterface<"BUFFER_BIGINT_8", true>;
|
|
301
317
|
};
|
|
302
318
|
readonly key: readonly [Key, Key];
|
|
303
319
|
};
|
|
@@ -370,6 +386,12 @@ declare const schema: {
|
|
|
370
386
|
readonly table: "history";
|
|
371
387
|
readonly key: readonly [Key, Key];
|
|
372
388
|
};
|
|
389
|
+
readonly historyOrdered: {
|
|
390
|
+
readonly type: "INDEX";
|
|
391
|
+
readonly table: "history";
|
|
392
|
+
readonly key: readonly [Key];
|
|
393
|
+
readonly storing: readonly [Key];
|
|
394
|
+
};
|
|
373
395
|
readonly chainAccountHash: {
|
|
374
396
|
readonly type: "INDEX";
|
|
375
397
|
readonly table: "chain";
|
|
@@ -383,15 +405,16 @@ declare const schema: {
|
|
|
383
405
|
readonly key: readonly [Key];
|
|
384
406
|
readonly storing: readonly [Key];
|
|
385
407
|
};
|
|
386
|
-
readonly
|
|
408
|
+
readonly votesOrderIndex: {
|
|
387
409
|
readonly type: "INDEX";
|
|
388
410
|
readonly table: "votes";
|
|
389
411
|
readonly key: readonly [Key, Key];
|
|
390
412
|
readonly storing: readonly [Key];
|
|
391
413
|
};
|
|
392
|
-
readonly
|
|
414
|
+
readonly votesExpiredIndex: {
|
|
393
415
|
readonly type: "INDEX";
|
|
394
416
|
readonly table: "votes";
|
|
417
|
+
readonly nullFiltered: true;
|
|
395
418
|
readonly key: readonly [Key, Key];
|
|
396
419
|
readonly storing: readonly [Key];
|
|
397
420
|
};
|
|
@@ -46,7 +46,7 @@ export declare class DBSqlite extends LedgerStorageBase implements LedgerStorage
|
|
|
46
46
|
getBlockHeight(transaction: DBSqliteTransaction, blockHash: BlockHash, account: GenericAccount): Promise<bigint | null>;
|
|
47
47
|
getVotes(transaction: DBSqliteTransaction, block: BlockHash, from: LedgerSelector): Promise<Vote[] | null>;
|
|
48
48
|
getVoteStaples(transaction: DBSqliteTransaction, voteBlockHashes: VoteBlockHash[], from?: LedgerSelector): Promise<VoteBlockHashMap<VoteStaple | null>>;
|
|
49
|
-
getHistory(transaction: DBSqliteTransaction, account: GenericAccount, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
49
|
+
getHistory(transaction: DBSqliteTransaction, account: GenericAccount | null, start: VoteBlockHash | null, limit?: number): Promise<VoteBlockHash[]>;
|
|
50
50
|
getBlockFromPrevious(transaction: DBSqliteTransaction, prevBlock: BlockHash, from: LedgerSelector): Promise<Block | null>;
|
|
51
51
|
getVotesFromMultiplePrevious(transaction: DBSqliteTransaction, prevBlocks: BlockHash[], from: LedgerSelector, issuer?: GenericAccount): Promise<{
|
|
52
52
|
[hash: string]: Vote[] | null;
|
package/lib/ledger/effects.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { GenericAccount, IdentifierAddress, NetworkAddress, TokenAddress } from '../account';
|
|
2
2
|
import Account from '../account';
|
|
3
|
-
import type { AdjustMethod
|
|
3
|
+
import type { AdjustMethod } from '../block';
|
|
4
4
|
import { Block } from '../block';
|
|
5
|
-
import type
|
|
5
|
+
import type * as Operations from '../block/operations';
|
|
6
|
+
import type { UserEditableAccountInfo, ACLEntry, ACLUpdate } from '../ledger/types';
|
|
6
7
|
import type { Certificate, CertificateBundle } from '../utils/certificate';
|
|
7
8
|
import { CertificateHash } from '../utils/certificate';
|
|
8
9
|
interface NumericValueEntry {
|
|
@@ -41,24 +42,23 @@ interface ComputedBlocksEffectTokenChangesField {
|
|
|
41
42
|
/**
|
|
42
43
|
* Which fields may be affected by blocks
|
|
43
44
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
account: GenericAccount;
|
|
49
|
-
};
|
|
45
|
+
interface CreateIdentifierRequest {
|
|
46
|
+
createdIdentifier: IdentifierAddress;
|
|
47
|
+
createArguments?: Operations.IdentifierCreateArguments;
|
|
48
|
+
}
|
|
50
49
|
type DelegationUpdate = {
|
|
51
50
|
delegateTo: Account;
|
|
52
51
|
};
|
|
53
52
|
interface ComputedBlocksEffectFields {
|
|
54
53
|
balance?: ComputedBlocksEffectTokenChangesField;
|
|
55
54
|
supply?: NumericValueEntry[];
|
|
56
|
-
info?:
|
|
55
|
+
info?: Partial<UserEditableAccountInfo>;
|
|
57
56
|
permissions?: ACLUpdate[];
|
|
58
57
|
permissionRequirements?: ACLEntry[];
|
|
59
58
|
createRequests?: CreateIdentifierRequest[];
|
|
60
59
|
delegation?: DelegationUpdate;
|
|
61
60
|
certificate?: CertificateUpdate[];
|
|
61
|
+
minSignerSetLength?: bigint;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Which accounts and fields are affected by a set of block
|
|
@@ -80,6 +80,7 @@ export type ComputedEffectOfBlocks = {
|
|
|
80
80
|
metadata: {
|
|
81
81
|
operationCount: number;
|
|
82
82
|
blockCount: number;
|
|
83
|
+
feeUnits: bigint;
|
|
83
84
|
};
|
|
84
85
|
};
|
|
85
86
|
type LedgerOptions = {
|