@aptos-labs/ts-sdk 0.0.1 → 0.0.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/dist/browser/index.global.js +25 -25
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.d.ts +160 -43
- package/dist/cjs/index.js +297 -94
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +160 -43
- package/dist/esm/index.mjs +294 -94
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +61 -15
- package/dist/types/index.js +26 -3
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ declare enum TransactionAuthenticatorVariant {
|
|
|
507
507
|
MultiEd25519 = 1,
|
|
508
508
|
MultiAgent = 2,
|
|
509
509
|
FeePayer = 3,
|
|
510
|
-
|
|
510
|
+
SingleSenderTransactionAuthenticator = 4
|
|
511
511
|
}
|
|
512
512
|
/**
|
|
513
513
|
* Transaction Authenticator enum as they are represented in Rust
|
|
@@ -516,7 +516,16 @@ declare enum TransactionAuthenticatorVariant {
|
|
|
516
516
|
declare enum AccountAuthenticatorVariant {
|
|
517
517
|
Ed25519 = 0,
|
|
518
518
|
MultiEd25519 = 1,
|
|
519
|
-
|
|
519
|
+
SingleKey = 2,
|
|
520
|
+
MultiKey = 3
|
|
521
|
+
}
|
|
522
|
+
declare enum AnyPublicKeyVariant {
|
|
523
|
+
Ed25519 = 0,
|
|
524
|
+
Secp256k1 = 1
|
|
525
|
+
}
|
|
526
|
+
declare enum AnySignatureVariant {
|
|
527
|
+
Ed25519 = 0,
|
|
528
|
+
Secp256k1 = 1
|
|
520
529
|
}
|
|
521
530
|
/**
|
|
522
531
|
* BCS types
|
|
@@ -1008,9 +1017,9 @@ declare type MoveUint32Type = number;
|
|
|
1008
1017
|
declare type MoveUint64Type = string;
|
|
1009
1018
|
declare type MoveUint128Type = string;
|
|
1010
1019
|
declare type MoveUint256Type = string;
|
|
1011
|
-
declare type MoveAddressType =
|
|
1012
|
-
declare type MoveObjectType =
|
|
1013
|
-
declare type MoveStructType =
|
|
1020
|
+
declare type MoveAddressType = string;
|
|
1021
|
+
declare type MoveObjectType = string;
|
|
1022
|
+
declare type MoveStructType = `${string}::${string}::${string}`;
|
|
1014
1023
|
declare type MoveOptionType = MoveType | null | undefined;
|
|
1015
1024
|
/**
|
|
1016
1025
|
* String representation of a on-chain Move struct type.
|
|
@@ -1171,7 +1180,7 @@ declare type LedgerInfo = {
|
|
|
1171
1180
|
*/
|
|
1172
1181
|
declare type Block = {
|
|
1173
1182
|
block_height: string;
|
|
1174
|
-
block_hash:
|
|
1183
|
+
block_hash: string;
|
|
1175
1184
|
block_timestamp: string;
|
|
1176
1185
|
first_version: string;
|
|
1177
1186
|
last_version: string;
|
|
@@ -1186,7 +1195,7 @@ declare type Block = {
|
|
|
1186
1195
|
declare type ViewRequestData = {
|
|
1187
1196
|
function: MoveStructType;
|
|
1188
1197
|
typeArguments?: Array<MoveResourceType>;
|
|
1189
|
-
|
|
1198
|
+
functionArguments?: Array<MoveValue>;
|
|
1190
1199
|
};
|
|
1191
1200
|
/**
|
|
1192
1201
|
* View request for the Move view function API
|
|
@@ -1202,7 +1211,7 @@ declare type ViewRequest = {
|
|
|
1202
1211
|
/**
|
|
1203
1212
|
* Arguments of the function
|
|
1204
1213
|
*/
|
|
1205
|
-
|
|
1214
|
+
functionArguments: Array<MoveValue>;
|
|
1206
1215
|
};
|
|
1207
1216
|
/**
|
|
1208
1217
|
* Table Item request for the GetTableItem API
|
|
@@ -1221,11 +1230,6 @@ declare type TableItemRequest = {
|
|
|
1221
1230
|
* They are combinations of signing schemes and derive schemes.
|
|
1222
1231
|
*/
|
|
1223
1232
|
declare type AuthenticationKeyScheme = SigningScheme | DeriveScheme;
|
|
1224
|
-
/**
|
|
1225
|
-
* A list of signing schemes that are supported by Aptos.
|
|
1226
|
-
*
|
|
1227
|
-
* https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L375-L378
|
|
1228
|
-
*/
|
|
1229
1233
|
declare enum SigningScheme {
|
|
1230
1234
|
/**
|
|
1231
1235
|
* For Ed25519PublicKey
|
|
@@ -1236,7 +1240,21 @@ declare enum SigningScheme {
|
|
|
1236
1240
|
*/
|
|
1237
1241
|
MultiEd25519 = 1,
|
|
1238
1242
|
/**
|
|
1239
|
-
* For
|
|
1243
|
+
* For SingleKey ecdsa
|
|
1244
|
+
*/
|
|
1245
|
+
SingleKey = 2
|
|
1246
|
+
}
|
|
1247
|
+
declare enum SigningSchemeInput {
|
|
1248
|
+
/**
|
|
1249
|
+
* For Ed25519PublicKey
|
|
1250
|
+
*/
|
|
1251
|
+
Ed25519 = 0,
|
|
1252
|
+
/**
|
|
1253
|
+
* For MultiEd25519PublicKey
|
|
1254
|
+
*/
|
|
1255
|
+
MultiEd25519 = 1,
|
|
1256
|
+
/**
|
|
1257
|
+
* For Secp256k1Ecdsa
|
|
1240
1258
|
*/
|
|
1241
1259
|
Secp256k1Ecdsa = 2
|
|
1242
1260
|
}
|
|
@@ -1265,5 +1283,33 @@ declare enum DeriveScheme {
|
|
|
1265
1283
|
*/
|
|
1266
1284
|
DeriveResourceAccountAddress = 255
|
|
1267
1285
|
}
|
|
1286
|
+
declare type WaitForTransactionOptions = {
|
|
1287
|
+
timeoutSecs?: number;
|
|
1288
|
+
checkSuccess?: boolean;
|
|
1289
|
+
indexerVersionCheck?: boolean;
|
|
1290
|
+
};
|
|
1291
|
+
/**
|
|
1292
|
+
* Account input type to generate an account using Legacy
|
|
1293
|
+
* Ed25519 or MultiEd25519 keys or without a specified `scheme`.
|
|
1294
|
+
* If `scheme` is not specified, we default to ED25519
|
|
1295
|
+
* In this case `legacy` is always true
|
|
1296
|
+
*/
|
|
1297
|
+
declare type GenerateAccountWithLegacyKey = {
|
|
1298
|
+
scheme?: SigningSchemeInput.Ed25519 | SigningSchemeInput.MultiEd25519;
|
|
1299
|
+
legacy: true;
|
|
1300
|
+
};
|
|
1301
|
+
/**
|
|
1302
|
+
* Account input type to generate an account using Unified
|
|
1303
|
+
* Secp256k1Ecdsa key
|
|
1304
|
+
* In this case `legacy` is always false
|
|
1305
|
+
*/
|
|
1306
|
+
declare type GenerateAccountWithUnifiedKey = {
|
|
1307
|
+
scheme: SigningSchemeInput.Secp256k1Ecdsa | SigningSchemeInput.Ed25519;
|
|
1308
|
+
legacy?: false;
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* Unify GenerateAccount type for Legacy and Unified keys
|
|
1312
|
+
*/
|
|
1313
|
+
declare type GenerateAccount = GenerateAccountWithLegacyKey | GenerateAccountWithUnifiedKey;
|
|
1268
1314
|
|
|
1269
|
-
export { AccountAuthenticatorVariant, AccountData, AccountEd25519Signature, AccountMultiEd25519Signature, AccountSecp256k1Signature, AccountSignature, AnyNumber, AptosRequest, AptosSettings, AuthenticationKeyScheme, Block, BlockMetadataTransactionResponse, Client, ClientConfig, ClientRequest, ClientResponse, DecodedTableData, DeletedTableData, DeriveScheme, DirectWriteSet, EntryFunctionPayloadResponse, Event, EventGuid, GasEstimation, GenesisPayload, GenesisTransactionResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, HexInput, LedgerInfo, LedgerVersion, MimeType, MoveAbility, MoveAddressType, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveObjectType, MoveOptionType, MoveResource, MoveResourceType, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructType, MoveType, MoveUint128Type, MoveUint16Type, MoveUint256Type, MoveUint32Type, MoveUint64Type, MoveUint8Type, MoveValue, MultisigPayloadResponse, OrderBy, OrderByValue, PaginationArgs, PendingTransactionResponse, RoleType, ScriptPayloadResponse, ScriptTransactionArgumentVariants, ScriptWriteSet, SigningScheme, StateCheckpointTransactionResponse, TableItemRequest, TokenStandard, TransactionAuthenticatorVariant, TransactionEd25519Signature, TransactionFeePayerSignature, TransactionMultiAgentSignature, TransactionMultiEd25519Signature, TransactionPayloadResponse, TransactionPayloadVariants, TransactionResponse, TransactionResponseType, TransactionSecp256k1Signature, TransactionSignature, TransactionVariants, TypeTagVariants, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8, UserTransactionResponse, ViewRequest, ViewRequestData, WriteSet, WriteSetChange, WriteSetChangeDeleteModule, WriteSetChangeDeleteResource, WriteSetChangeDeleteTableItem, WriteSetChangeWriteModule, WriteSetChangeWriteResource, WriteSetChangeWriteTableItem };
|
|
1315
|
+
export { AccountAuthenticatorVariant, AccountData, AccountEd25519Signature, AccountMultiEd25519Signature, AccountSecp256k1Signature, AccountSignature, AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, AptosRequest, AptosSettings, AuthenticationKeyScheme, Block, BlockMetadataTransactionResponse, Client, ClientConfig, ClientRequest, ClientResponse, DecodedTableData, DeletedTableData, DeriveScheme, DirectWriteSet, EntryFunctionPayloadResponse, Event, EventGuid, GasEstimation, GenerateAccount, GenerateAccountWithLegacyKey, GenerateAccountWithUnifiedKey, GenesisPayload, GenesisTransactionResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, HexInput, LedgerInfo, LedgerVersion, MimeType, MoveAbility, MoveAddressType, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveObjectType, MoveOptionType, MoveResource, MoveResourceType, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructType, MoveType, MoveUint128Type, MoveUint16Type, MoveUint256Type, MoveUint32Type, MoveUint64Type, MoveUint8Type, MoveValue, MultisigPayloadResponse, OrderBy, OrderByValue, PaginationArgs, PendingTransactionResponse, RoleType, ScriptPayloadResponse, ScriptTransactionArgumentVariants, ScriptWriteSet, SigningScheme, SigningSchemeInput, StateCheckpointTransactionResponse, TableItemRequest, TokenStandard, TransactionAuthenticatorVariant, TransactionEd25519Signature, TransactionFeePayerSignature, TransactionMultiAgentSignature, TransactionMultiEd25519Signature, TransactionPayloadResponse, TransactionPayloadVariants, TransactionResponse, TransactionResponseType, TransactionSecp256k1Signature, TransactionSignature, TransactionVariants, TypeTagVariants, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8, UserTransactionResponse, ViewRequest, ViewRequestData, WaitForTransactionOptions, WriteSet, WriteSetChange, WriteSetChangeDeleteModule, WriteSetChangeDeleteResource, WriteSetChangeDeleteTableItem, WriteSetChangeWriteModule, WriteSetChangeWriteResource, WriteSetChangeWriteTableItem };
|
package/dist/types/index.js
CHANGED
|
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var types_exports = {};
|
|
22
22
|
__export(types_exports, {
|
|
23
23
|
AccountAuthenticatorVariant: () => AccountAuthenticatorVariant,
|
|
24
|
+
AnyPublicKeyVariant: () => AnyPublicKeyVariant,
|
|
25
|
+
AnySignatureVariant: () => AnySignatureVariant,
|
|
24
26
|
DeriveScheme: () => DeriveScheme,
|
|
25
27
|
MimeType: () => MimeType,
|
|
26
28
|
MoveAbility: () => MoveAbility,
|
|
@@ -28,6 +30,7 @@ __export(types_exports, {
|
|
|
28
30
|
RoleType: () => RoleType,
|
|
29
31
|
ScriptTransactionArgumentVariants: () => ScriptTransactionArgumentVariants,
|
|
30
32
|
SigningScheme: () => SigningScheme,
|
|
33
|
+
SigningSchemeInput: () => SigningSchemeInput,
|
|
31
34
|
TransactionAuthenticatorVariant: () => TransactionAuthenticatorVariant,
|
|
32
35
|
TransactionPayloadVariants: () => TransactionPayloadVariants,
|
|
33
36
|
TransactionResponseType: () => TransactionResponseType,
|
|
@@ -83,15 +86,26 @@ var TransactionAuthenticatorVariant = /* @__PURE__ */ ((TransactionAuthenticator
|
|
|
83
86
|
TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["MultiEd25519"] = 1] = "MultiEd25519";
|
|
84
87
|
TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["MultiAgent"] = 2] = "MultiAgent";
|
|
85
88
|
TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["FeePayer"] = 3] = "FeePayer";
|
|
86
|
-
TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["
|
|
89
|
+
TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["SingleSenderTransactionAuthenticator"] = 4] = "SingleSenderTransactionAuthenticator";
|
|
87
90
|
return TransactionAuthenticatorVariant2;
|
|
88
91
|
})(TransactionAuthenticatorVariant || {});
|
|
89
92
|
var AccountAuthenticatorVariant = /* @__PURE__ */ ((AccountAuthenticatorVariant2) => {
|
|
90
93
|
AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["Ed25519"] = 0] = "Ed25519";
|
|
91
94
|
AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["MultiEd25519"] = 1] = "MultiEd25519";
|
|
92
|
-
AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["
|
|
95
|
+
AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["SingleKey"] = 2] = "SingleKey";
|
|
96
|
+
AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["MultiKey"] = 3] = "MultiKey";
|
|
93
97
|
return AccountAuthenticatorVariant2;
|
|
94
98
|
})(AccountAuthenticatorVariant || {});
|
|
99
|
+
var AnyPublicKeyVariant = /* @__PURE__ */ ((AnyPublicKeyVariant2) => {
|
|
100
|
+
AnyPublicKeyVariant2[AnyPublicKeyVariant2["Ed25519"] = 0] = "Ed25519";
|
|
101
|
+
AnyPublicKeyVariant2[AnyPublicKeyVariant2["Secp256k1"] = 1] = "Secp256k1";
|
|
102
|
+
return AnyPublicKeyVariant2;
|
|
103
|
+
})(AnyPublicKeyVariant || {});
|
|
104
|
+
var AnySignatureVariant = /* @__PURE__ */ ((AnySignatureVariant2) => {
|
|
105
|
+
AnySignatureVariant2[AnySignatureVariant2["Ed25519"] = 0] = "Ed25519";
|
|
106
|
+
AnySignatureVariant2[AnySignatureVariant2["Secp256k1"] = 1] = "Secp256k1";
|
|
107
|
+
return AnySignatureVariant2;
|
|
108
|
+
})(AnySignatureVariant || {});
|
|
95
109
|
var TransactionResponseType = /* @__PURE__ */ ((TransactionResponseType2) => {
|
|
96
110
|
TransactionResponseType2["Pending"] = "pending_transaction";
|
|
97
111
|
TransactionResponseType2["User"] = "user_transaction";
|
|
@@ -121,9 +135,15 @@ var RoleType = /* @__PURE__ */ ((RoleType2) => {
|
|
|
121
135
|
var SigningScheme = /* @__PURE__ */ ((SigningScheme2) => {
|
|
122
136
|
SigningScheme2[SigningScheme2["Ed25519"] = 0] = "Ed25519";
|
|
123
137
|
SigningScheme2[SigningScheme2["MultiEd25519"] = 1] = "MultiEd25519";
|
|
124
|
-
SigningScheme2[SigningScheme2["
|
|
138
|
+
SigningScheme2[SigningScheme2["SingleKey"] = 2] = "SingleKey";
|
|
125
139
|
return SigningScheme2;
|
|
126
140
|
})(SigningScheme || {});
|
|
141
|
+
var SigningSchemeInput = /* @__PURE__ */ ((SigningSchemeInput2) => {
|
|
142
|
+
SigningSchemeInput2[SigningSchemeInput2["Ed25519"] = 0] = "Ed25519";
|
|
143
|
+
SigningSchemeInput2[SigningSchemeInput2["MultiEd25519"] = 1] = "MultiEd25519";
|
|
144
|
+
SigningSchemeInput2[SigningSchemeInput2["Secp256k1Ecdsa"] = 2] = "Secp256k1Ecdsa";
|
|
145
|
+
return SigningSchemeInput2;
|
|
146
|
+
})(SigningSchemeInput || {});
|
|
127
147
|
var DeriveScheme = /* @__PURE__ */ ((DeriveScheme2) => {
|
|
128
148
|
DeriveScheme2[DeriveScheme2["DeriveAuid"] = 251] = "DeriveAuid";
|
|
129
149
|
DeriveScheme2[DeriveScheme2["DeriveObjectAddressFromObject"] = 252] = "DeriveObjectAddressFromObject";
|
|
@@ -135,6 +155,8 @@ var DeriveScheme = /* @__PURE__ */ ((DeriveScheme2) => {
|
|
|
135
155
|
// Annotate the CommonJS export names for ESM import in node:
|
|
136
156
|
0 && (module.exports = {
|
|
137
157
|
AccountAuthenticatorVariant,
|
|
158
|
+
AnyPublicKeyVariant,
|
|
159
|
+
AnySignatureVariant,
|
|
138
160
|
DeriveScheme,
|
|
139
161
|
MimeType,
|
|
140
162
|
MoveAbility,
|
|
@@ -142,6 +164,7 @@ var DeriveScheme = /* @__PURE__ */ ((DeriveScheme2) => {
|
|
|
142
164
|
RoleType,
|
|
143
165
|
ScriptTransactionArgumentVariants,
|
|
144
166
|
SigningScheme,
|
|
167
|
+
SigningSchemeInput,
|
|
145
168
|
TransactionAuthenticatorVariant,
|
|
146
169
|
TransactionPayloadVariants,
|
|
147
170
|
TransactionResponseType,
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Network } from \"../utils/apiEndpoints\";\n\nexport * from \"./indexer\";\n\nexport enum MimeType {\n /**\n * JSON representation, used for transaction submission and accept type JSON output\n */\n JSON = \"application/json\",\n /**\n * BCS representation, used for accept type BCS output\n */\n BCS = \"application/x-bcs\",\n /**\n * BCS representation, used for transaction submission in BCS input\n */\n BCS_SIGNED_TRANSACTION = \"application/x.aptos.signed_transaction+bcs\",\n}\n\n/**\n * Hex data as input to a function\n */\nexport type HexInput = string | Uint8Array;\n\n/**\n * Script transaction arguments enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}\n */\nexport enum TypeTagVariants {\n Bool = 0,\n U8 = 1,\n U64 = 2,\n U128 = 3,\n Address = 4,\n Signer = 5,\n Vector = 6,\n Struct = 7,\n U16 = 8,\n U32 = 9,\n U256 = 10,\n}\n\n/**\n * Script transaction arguments enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}\n */\nexport enum ScriptTransactionArgumentVariants {\n U8 = 0,\n U64 = 1,\n U128 = 2,\n Address = 3,\n U8Vector = 4,\n Bool = 5,\n U16 = 6,\n U32 = 7,\n U256 = 8,\n}\n\n/**\n * Transaction payload enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionPayloadVariants {\n Script = 0,\n EntryFunction = 2,\n Multisig = 3,\n}\n\n/**\n * Transaction variants enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}\n */\nexport enum TransactionVariants {\n MultiAgentTransaction = 0,\n FeePayerTransaction = 1,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}\n */\nexport enum TransactionAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n MultiAgent = 2,\n FeePayer = 3,\n Secp256k1Ecdsa = 4,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}\n */\nexport enum AccountAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n Secp256k1 = 2,\n}\n\n/**\n * BCS types\n */\nexport type Uint8 = number;\nexport type Uint16 = number;\nexport type Uint32 = number;\nexport type Uint64 = bigint;\nexport type Uint128 = bigint;\nexport type Uint256 = bigint;\nexport type AnyNumber = number | bigint;\n\n/**\n * Set of configuration options that can be provided when initializing the SDK.\n * The purpose of these options is to configure various aspects of the SDK's\n * behavior and interaction with the Aptos network\n */\nexport type AptosSettings = {\n readonly network?: Network;\n\n readonly fullnode?: string;\n\n readonly faucet?: string;\n\n readonly indexer?: string;\n\n readonly clientConfig?: ClientConfig;\n\n readonly client?: Client;\n};\n\n/**\n *\n * Controls the number of results that are returned and the starting position of those results.\n * @param offset parameter specifies the starting position of the query result within the set of data. Default is 0.\n * @param limit specifies the maximum number of items or records to return in a query result. Default is 25.\n */\nexport interface PaginationArgs {\n offset?: AnyNumber;\n limit?: number;\n}\n\n/**\n * QUERY TYPES\n */\n\n/**\n * A configuration object we can pass with the request to the server.\n *\n * @param TOKEN - an auth token to send with the request\n * @param HEADERS - extra headers we want to send with the request\n * @param WITH_CREDENTIALS - whether to carry cookies. By default, it is set to true and cookies will be sent\n */\nexport type ClientConfig = {\n TOKEN?: string;\n HEADERS?: Record<string, string | number | boolean>;\n WITH_CREDENTIALS?: boolean;\n};\n\nexport interface ClientRequest<Req> {\n url: string;\n method: \"GET\" | \"POST\";\n body?: Req;\n contentType?: string;\n params?: any;\n overrides?: ClientConfig;\n headers?: Record<string, any>;\n}\n\nexport interface ClientResponse<Res> {\n status: number;\n statusText: string;\n data: Res;\n config?: any;\n request?: any;\n response?: any;\n headers?: any;\n}\n\nexport interface Client {\n provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;\n}\n\n/**\n * The API request type\n *\n * @param url - the url to make the request to, i.e https://fullnode.aptoslabs.devnet.com/v1\n * @param method - the request method \"GET\" | \"POST\"\n * @param endpoint (optional) - the endpoint to make the request to, i.e transactions\n * @param body (optional) - the body of the request\n * @param contentType (optional) - the content type to set the `content-type` header to,\n * by default is set to `application/json`\n * @param params (optional) - query params to add to the request\n * @param originMethod (optional) - the local method the request came from\n * @param overrides (optional) - a `ClientConfig` object type to override request data\n */\nexport type AptosRequest = {\n url: string;\n method: \"GET\" | \"POST\";\n path?: string;\n body?: any;\n contentType?: string;\n acceptType?: string;\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n originMethod?: string;\n overrides?: ClientConfig;\n};\n\n/**\n * Specifies ledger version of transactions. By default latest version will be used\n */\nexport type LedgerVersion = {\n ledgerVersion?: AnyNumber;\n};\n\n/**\n * RESPONSE TYPES\n */\n\n/**\n * Type holding the outputs of the estimate gas API\n */\nexport type GasEstimation = {\n /**\n * The deprioritized estimate for the gas unit price\n */\n deprioritized_gas_estimate?: number;\n /**\n * The current estimate for the gas unit price\n */\n gas_estimate: number;\n /**\n * The prioritized estimate for the gas unit price\n */\n prioritized_gas_estimate?: number;\n};\n\nexport type MoveResource = {\n type: MoveResourceType;\n data: {};\n};\n\nexport type AccountData = {\n sequence_number: string;\n authentication_key: string;\n};\n\nexport type MoveModuleBytecode = {\n bytecode: string;\n abi?: MoveModule;\n};\n\n/**\n * TRANSACTION TYPES\n */\n\nexport enum TransactionResponseType {\n Pending = \"pending_transaction\",\n User = \"user_transaction\",\n Genesis = \"genesis_transaction\",\n BlockMetadata = \"block_metadata_transaction\",\n StateCheckpoint = \"state_checkpoint_transaction\",\n}\n\nexport type TransactionResponse =\n | PendingTransactionResponse\n | UserTransactionResponse\n | GenesisTransactionResponse\n | BlockMetadataTransactionResponse\n | StateCheckpointTransactionResponse;\n\nexport type PendingTransactionResponse = {\n type: TransactionResponseType.Pending;\n hash: string;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n};\n\nexport type UserTransactionResponse = {\n type: TransactionResponseType.User;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n /**\n * Events generated by the transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\nexport type GenesisTransactionResponse = {\n type: TransactionResponseType.Genesis;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n payload: GenesisPayload;\n /**\n * Events emitted during genesis\n */\n events: Array<Event>;\n};\n\nexport type BlockMetadataTransactionResponse = {\n type: TransactionResponseType.BlockMetadata;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n id: string;\n epoch: string;\n round: string;\n /**\n * The events emitted at the block creation\n */\n events: Array<Event>;\n /**\n * Previous block votes\n */\n previous_block_votes_bitvec: Array<number>;\n proposer: string;\n /**\n * The indices of the proposers who failed to propose\n */\n failed_proposer_indices: Array<number>;\n timestamp: string;\n};\n\nexport type StateCheckpointTransactionResponse = {\n type: TransactionResponseType.StateCheckpoint;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n};\n\n/**\n * WRITESET CHANGE TYPES\n */\n\nexport type WriteSetChange =\n | WriteSetChangeDeleteModule\n | WriteSetChangeDeleteResource\n | WriteSetChangeDeleteTableItem\n | WriteSetChangeWriteModule\n | WriteSetChangeWriteResource\n | WriteSetChangeWriteTableItem;\n\nexport type WriteSetChangeDeleteModule = {\n type: string;\n address: string;\n /**\n * State key hash\n */\n state_key_hash: string;\n module: MoveModuleId;\n};\n\nexport type WriteSetChangeDeleteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n resource: string;\n};\n\nexport type WriteSetChangeDeleteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n data?: DeletedTableData;\n};\n\nexport type WriteSetChangeWriteModule = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveModuleBytecode;\n};\n\nexport type WriteSetChangeWriteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveResource;\n};\n\nexport type WriteSetChangeWriteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n value: string;\n data?: DecodedTableData;\n};\n\nexport type DecodedTableData = {\n /**\n * Key of table in JSON\n */\n key: any;\n /**\n * Type of key\n */\n key_type: string;\n /**\n * Value of table in JSON\n */\n value: any;\n /**\n * Type of value\n */\n value_type: string;\n};\n\n/**\n * Deleted table data\n */\nexport type DeletedTableData = {\n /**\n * Deleted key\n */\n key: any;\n /**\n * Deleted key type\n */\n key_type: string;\n};\n\nexport type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;\n\nexport type EntryFunctionPayloadResponse = {\n type: string;\n function: MoveResourceType;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type ScriptPayloadResponse = {\n type: string;\n code: MoveScriptBytecode;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type MultisigPayloadResponse = {\n type: string;\n multisig_address: string;\n transaction_payload?: EntryFunctionPayloadResponse;\n};\n\nexport type GenesisPayload = {\n type: string;\n write_set: WriteSet;\n};\n\n/**\n * Move script bytecode\n */\nexport type MoveScriptBytecode = {\n bytecode: string;\n abi?: MoveFunction;\n};\n\n/**\n * These are the JSON representations of transaction signatures returned from the node API.\n */\nexport type TransactionSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature\n | TransactionMultiAgentSignature\n | TransactionFeePayerSignature;\n\nexport type TransactionEd25519Signature = {\n type: string;\n public_key: string;\n signature: \"ed25519_signature\";\n};\n\nexport type TransactionSecp256k1Signature = {\n type: string;\n public_key: string;\n signature: \"secp256k1_ecdsa_signature\";\n};\n\nexport type TransactionMultiEd25519Signature = {\n type: \"multi_ed25519_signature\";\n /**\n * The public keys for the Ed25519 signature\n */\n public_keys: Array<string>;\n /**\n * Signature associated with the public keys in the same order\n */\n signatures: Array<string>;\n /**\n * The number of signatures required for a successful transaction\n */\n threshold: number;\n bitmap: string;\n};\n\nexport type TransactionMultiAgentSignature = {\n type: \"multi_agent_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n};\n\nexport type TransactionFeePayerSignature = {\n type: \"fee_payer_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n fee_payer_address: string;\n fee_payer_signer: AccountSignature;\n};\n\n/**\n * The union of all single account signatures.\n */\nexport type AccountSignature = AccountEd25519Signature | AccountSecp256k1Signature | AccountMultiEd25519Signature;\n\nexport type AccountEd25519Signature = TransactionEd25519Signature;\n\nexport type AccountSecp256k1Signature = TransactionSecp256k1Signature;\n\nexport type AccountMultiEd25519Signature = TransactionMultiEd25519Signature;\n\nexport type WriteSet = ScriptWriteSet | DirectWriteSet;\n\nexport type ScriptWriteSet = {\n type: string;\n execute_as: string;\n script: ScriptPayloadResponse;\n};\n\nexport type DirectWriteSet = {\n type: string;\n changes: Array<WriteSetChange>;\n events: Array<Event>;\n};\n\nexport type EventGuid = {\n creation_number: string;\n account_address: string;\n};\n\nexport type Event = {\n guid: EventGuid;\n sequence_number: string;\n type: string;\n /**\n * The JSON representation of the event\n */\n data: any;\n};\n\n/**\n * Map of Move types to local TypeScript types\n */\nexport type MoveUint8Type = number;\nexport type MoveUint16Type = number;\nexport type MoveUint32Type = number;\nexport type MoveUint64Type = string;\nexport type MoveUint128Type = string;\nexport type MoveUint256Type = string;\nexport type MoveAddressType = `0x${string}`;\nexport type MoveObjectType = `0x${string}`;\nexport type MoveStructType = `0x${string}::${string}::${string}`;\nexport type MoveOptionType = MoveType | null | undefined;\n/**\n * String representation of a on-chain Move struct type.\n */\nexport type MoveResourceType = `${string}::${string}::${string}`;\n\nexport type MoveType =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | Array<MoveType>;\n\n/**\n * Possible Move values acceptable by move functions (entry, view)\n *\n * Map of a Move value to the corresponding TypeScript value\n *\n * `Bool -> boolean`\n *\n * `u8, u16, u32 -> number`\n *\n * `u64, u128, u256 -> string`\n *\n * `String -> string`\n *\n * `Address -> 0x${string}`\n *\n * `Struct - 0x${string}::${string}::${string}`\n *\n * `Object -> 0x${string}`\n *\n * `Vector -> Array<MoveValue>`\n *\n * `Option -> MoveValue | null | undefined`\n */\nexport type MoveValue =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | MoveOptionType\n | Array<MoveValue>;\n\n/**\n * Move module id is a string representation of Move module.\n * Module name is case-sensitive.\n */\nexport type MoveModuleId = `${string}::${string}`;\n\n/**\n * Move function visibility\n */\nexport enum MoveFunctionVisibility {\n PRIVATE = \"private\",\n PUBLIC = \"public\",\n FRIEND = \"friend\",\n}\n\n/**\n * Move function ability\n */\nexport enum MoveAbility {\n STORE = \"store\",\n DROP = \"drop\",\n KEY = \"key\",\n COPY = \"copy\",\n}\n\n/**\n * Move abilities tied to the generic type param and associated with the function that uses it\n */\nexport type MoveFunctionGenericTypeParam = {\n constraints: Array<MoveAbility>;\n};\n\n/**\n * Move struct field\n */\nexport type MoveStructField = {\n name: string;\n type: string;\n};\n\n/**\n * A Move module\n */\nexport type MoveModule = {\n address: string;\n name: string;\n /**\n * Friends of the module\n */\n friends: Array<MoveModuleId>;\n /**\n * Public functions of the module\n */\n exposed_functions: Array<MoveFunction>;\n /**\n * Structs of the module\n */\n structs: Array<MoveStruct>;\n};\n\n/**\n * A move struct\n */\nexport type MoveStruct = {\n name: string;\n /**\n * Whether the struct is a native struct of Move\n */\n is_native: boolean;\n /**\n * Abilities associated with the struct\n */\n abilities: Array<MoveAbility>;\n /**\n * Generic types associated with the struct\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Fields associated with the struct\n */\n fields: Array<MoveStructField>;\n};\n\n/**\n * Move function\n */\nexport type MoveFunction = {\n name: string;\n visibility: MoveFunctionVisibility;\n /**\n * Whether the function can be called as an entry function directly in a transaction\n */\n is_entry: boolean;\n /**\n * Whether the function is a view function or not\n */\n is_view: boolean;\n /**\n * Generic type params associated with the Move function\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Parameters associated with the move function\n */\n params: Array<string>;\n /**\n * Return type of the function\n */\n return: Array<string>;\n};\n\nexport enum RoleType {\n VALIDATOR = \"validator\",\n FULL_NODE = \"full_node\",\n}\n\nexport type LedgerInfo = {\n /**\n * Chain ID of the current chain\n */\n chain_id: number;\n epoch: string;\n ledger_version: string;\n oldest_ledger_version: string;\n ledger_timestamp: string;\n node_role: RoleType;\n oldest_block_height: string;\n block_height: string;\n /**\n * Git hash of the build of the API endpoint. Can be used to determine the exact\n * software version used by the API endpoint.\n */\n git_hash?: string;\n};\n\n/**\n * A Block type\n */\nexport type Block = {\n block_height: string;\n block_hash: `0x${string}`;\n block_timestamp: string;\n first_version: string;\n last_version: string;\n /**\n * The transactions in the block in sequential order\n */\n transactions?: Array<TransactionResponse>;\n};\n\n/**\n * The data needed to generate a View Request payload\n */\nexport type ViewRequestData = {\n function: MoveStructType;\n typeArguments?: Array<MoveResourceType>;\n arguments?: Array<MoveValue>;\n};\n\n// REQUEST TYPES\n\n/**\n * View request for the Move view function API\n *\n * `type MoveResourceType = ${string}::${string}::${string}`;\n */\nexport type ViewRequest = {\n function: MoveResourceType;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<MoveResourceType>;\n /**\n * Arguments of the function\n */\n arguments: Array<MoveValue>;\n};\n\n/**\n * Table Item request for the GetTableItem API\n */\nexport type TableItemRequest = {\n key_type: MoveValue;\n value_type: MoveValue;\n /**\n * The value of the table item's key\n */\n key: any;\n};\n\n/**\n * A list of Authentication Key schemes that are supported by Aptos.\n *\n * They are combinations of signing schemes and derive schemes.\n */\nexport type AuthenticationKeyScheme = SigningScheme | DeriveScheme;\n\n/**\n * A list of signing schemes that are supported by Aptos.\n *\n * https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L375-L378\n */\nexport enum SigningScheme {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For Secp256k1 ecdsa\n */\n Secp256k1Ecdsa = 2,\n}\n\n/**\n * Scheme used for deriving account addresses from other data\n */\nexport enum DeriveScheme {\n /**\n * Derives an address using an AUID, used for objects\n */\n DeriveAuid = 251,\n /**\n * Derives an address from another object address\n */\n DeriveObjectAddressFromObject = 252,\n /**\n * Derives an address from a GUID, used for objects\n */\n DeriveObjectAddressFromGuid = 253,\n /**\n * Derives an address from seed bytes, used for named objects\n */\n DeriveObjectAddressFromSeed = 254,\n /**\n * Derives an address from seed bytes, used for resource accounts\n */\n DeriveResourceAccountAddress = 255,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAK,WAAL,kBAAKA,cAAL;AAIL,EAAAA,UAAA,UAAO;AAIP,EAAAA,UAAA,SAAM;AAIN,EAAAA,UAAA,4BAAyB;AAZf,SAAAA;AAAA,GAAA;AAwBL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,kCAAA,UAAO,KAAP;AACA,EAAAA,kCAAA,QAAK,KAAL;AACA,EAAAA,kCAAA,SAAM,KAAN;AACA,EAAAA,kCAAA,UAAO,KAAP;AACA,EAAAA,kCAAA,aAAU,KAAV;AACA,EAAAA,kCAAA,YAAS,KAAT;AACA,EAAAA,kCAAA,YAAS,KAAT;AACA,EAAAA,kCAAA,YAAS,KAAT;AACA,EAAAA,kCAAA,SAAM,KAAN;AACA,EAAAA,kCAAA,SAAM,KAAN;AACA,EAAAA,kCAAA,UAAO,MAAP;AAXU,SAAAA;AAAA,GAAA;AAkBL,IAAK,oCAAL,kBAAKC,uCAAL;AACL,EAAAA,sEAAA,QAAK,KAAL;AACA,EAAAA,sEAAA,SAAM,KAAN;AACA,EAAAA,sEAAA,UAAO,KAAP;AACA,EAAAA,sEAAA,aAAU,KAAV;AACA,EAAAA,sEAAA,cAAW,KAAX;AACA,EAAAA,sEAAA,UAAO,KAAP;AACA,EAAAA,sEAAA,SAAM,KAAN;AACA,EAAAA,sEAAA,SAAM,KAAN;AACA,EAAAA,sEAAA,UAAO,KAAP;AATU,SAAAA;AAAA,GAAA;AAgBL,IAAK,6BAAL,kBAAKC,gCAAL;AACL,EAAAA,wDAAA,YAAS,KAAT;AACA,EAAAA,wDAAA,mBAAgB,KAAhB;AACA,EAAAA,wDAAA,cAAW,KAAX;AAHU,SAAAA;AAAA,GAAA;AAUL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,0CAAA,2BAAwB,KAAxB;AACA,EAAAA,0CAAA,yBAAsB,KAAtB;AAFU,SAAAA;AAAA,GAAA;AASL,IAAK,kCAAL,kBAAKC,qCAAL;AACL,EAAAA,kEAAA,aAAU,KAAV;AACA,EAAAA,kEAAA,kBAAe,KAAf;AACA,EAAAA,kEAAA,gBAAa,KAAb;AACA,EAAAA,kEAAA,cAAW,KAAX;AACA,EAAAA,kEAAA,oBAAiB,KAAjB;AALU,SAAAA;AAAA,GAAA;AAYL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,0DAAA,aAAU,KAAV;AACA,EAAAA,0DAAA,kBAAe,KAAf;AACA,EAAAA,0DAAA,eAAY,KAAZ;AAHU,SAAAA;AAAA,GAAA;AAiKL,IAAK,0BAAL,kBAAKC,6BAAL;AACL,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,UAAO;AACP,EAAAA,yBAAA,aAAU;AACV,EAAAA,yBAAA,mBAAgB;AAChB,EAAAA,yBAAA,qBAAkB;AALR,SAAAA;AAAA,GAAA;AAgeL,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;AASL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AACP,EAAAA,aAAA,SAAM;AACN,EAAAA,aAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,eAAY;AAFF,SAAAA;AAAA,GAAA;AA2FL,IAAK,gBAAL,kBAAKC,mBAAL;AAIL,EAAAA,8BAAA,aAAU,KAAV;AAIA,EAAAA,8BAAA,kBAAe,KAAf;AAIA,EAAAA,8BAAA,oBAAiB,KAAjB;AAZU,SAAAA;AAAA,GAAA;AAkBL,IAAK,eAAL,kBAAKC,kBAAL;AAIL,EAAAA,4BAAA,gBAAa,OAAb;AAIA,EAAAA,4BAAA,mCAAgC,OAAhC;AAIA,EAAAA,4BAAA,iCAA8B,OAA9B;AAIA,EAAAA,4BAAA,iCAA8B,OAA9B;AAIA,EAAAA,4BAAA,kCAA+B,OAA/B;AApBU,SAAAA;AAAA,GAAA;","names":["MimeType","TypeTagVariants","ScriptTransactionArgumentVariants","TransactionPayloadVariants","TransactionVariants","TransactionAuthenticatorVariant","AccountAuthenticatorVariant","TransactionResponseType","MoveFunctionVisibility","MoveAbility","RoleType","SigningScheme","DeriveScheme"]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Network } from \"../utils/apiEndpoints\";\n\nexport * from \"./indexer\";\n\nexport enum MimeType {\n /**\n * JSON representation, used for transaction submission and accept type JSON output\n */\n JSON = \"application/json\",\n /**\n * BCS representation, used for accept type BCS output\n */\n BCS = \"application/x-bcs\",\n /**\n * BCS representation, used for transaction submission in BCS input\n */\n BCS_SIGNED_TRANSACTION = \"application/x.aptos.signed_transaction+bcs\",\n}\n\n/**\n * Hex data as input to a function\n */\nexport type HexInput = string | Uint8Array;\n\n/**\n * Script transaction arguments enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}\n */\nexport enum TypeTagVariants {\n Bool = 0,\n U8 = 1,\n U64 = 2,\n U128 = 3,\n Address = 4,\n Signer = 5,\n Vector = 6,\n Struct = 7,\n U16 = 8,\n U32 = 9,\n U256 = 10,\n}\n\n/**\n * Script transaction arguments enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}\n */\nexport enum ScriptTransactionArgumentVariants {\n U8 = 0,\n U64 = 1,\n U128 = 2,\n Address = 3,\n U8Vector = 4,\n Bool = 5,\n U16 = 6,\n U32 = 7,\n U256 = 8,\n}\n\n/**\n * Transaction payload enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionPayloadVariants {\n Script = 0,\n EntryFunction = 2,\n Multisig = 3,\n}\n\n/**\n * Transaction variants enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}\n */\nexport enum TransactionVariants {\n MultiAgentTransaction = 0,\n FeePayerTransaction = 1,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}\n */\nexport enum TransactionAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n MultiAgent = 2,\n FeePayer = 3,\n SingleSenderTransactionAuthenticator = 4,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}\n */\nexport enum AccountAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n SingleKey = 2,\n MultiKey = 3,\n}\n\nexport enum AnyPublicKeyVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n}\n\nexport enum AnySignatureVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n}\n\n/**\n * BCS types\n */\nexport type Uint8 = number;\nexport type Uint16 = number;\nexport type Uint32 = number;\nexport type Uint64 = bigint;\nexport type Uint128 = bigint;\nexport type Uint256 = bigint;\nexport type AnyNumber = number | bigint;\n\n/**\n * Set of configuration options that can be provided when initializing the SDK.\n * The purpose of these options is to configure various aspects of the SDK's\n * behavior and interaction with the Aptos network\n */\nexport type AptosSettings = {\n readonly network?: Network;\n\n readonly fullnode?: string;\n\n readonly faucet?: string;\n\n readonly indexer?: string;\n\n readonly clientConfig?: ClientConfig;\n\n readonly client?: Client;\n};\n\n/**\n *\n * Controls the number of results that are returned and the starting position of those results.\n * @param offset parameter specifies the starting position of the query result within the set of data. Default is 0.\n * @param limit specifies the maximum number of items or records to return in a query result. Default is 25.\n */\nexport interface PaginationArgs {\n offset?: AnyNumber;\n limit?: number;\n}\n\n/**\n * QUERY TYPES\n */\n\n/**\n * A configuration object we can pass with the request to the server.\n *\n * @param TOKEN - an auth token to send with the request\n * @param HEADERS - extra headers we want to send with the request\n * @param WITH_CREDENTIALS - whether to carry cookies. By default, it is set to true and cookies will be sent\n */\nexport type ClientConfig = {\n TOKEN?: string;\n HEADERS?: Record<string, string | number | boolean>;\n WITH_CREDENTIALS?: boolean;\n};\n\nexport interface ClientRequest<Req> {\n url: string;\n method: \"GET\" | \"POST\";\n body?: Req;\n contentType?: string;\n params?: any;\n overrides?: ClientConfig;\n headers?: Record<string, any>;\n}\n\nexport interface ClientResponse<Res> {\n status: number;\n statusText: string;\n data: Res;\n config?: any;\n request?: any;\n response?: any;\n headers?: any;\n}\n\nexport interface Client {\n provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;\n}\n\n/**\n * The API request type\n *\n * @param url - the url to make the request to, i.e https://fullnode.aptoslabs.devnet.com/v1\n * @param method - the request method \"GET\" | \"POST\"\n * @param endpoint (optional) - the endpoint to make the request to, i.e transactions\n * @param body (optional) - the body of the request\n * @param contentType (optional) - the content type to set the `content-type` header to,\n * by default is set to `application/json`\n * @param params (optional) - query params to add to the request\n * @param originMethod (optional) - the local method the request came from\n * @param overrides (optional) - a `ClientConfig` object type to override request data\n */\nexport type AptosRequest = {\n url: string;\n method: \"GET\" | \"POST\";\n path?: string;\n body?: any;\n contentType?: string;\n acceptType?: string;\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n originMethod?: string;\n overrides?: ClientConfig;\n};\n\n/**\n * Specifies ledger version of transactions. By default latest version will be used\n */\nexport type LedgerVersion = {\n ledgerVersion?: AnyNumber;\n};\n\n/**\n * RESPONSE TYPES\n */\n\n/**\n * Type holding the outputs of the estimate gas API\n */\nexport type GasEstimation = {\n /**\n * The deprioritized estimate for the gas unit price\n */\n deprioritized_gas_estimate?: number;\n /**\n * The current estimate for the gas unit price\n */\n gas_estimate: number;\n /**\n * The prioritized estimate for the gas unit price\n */\n prioritized_gas_estimate?: number;\n};\n\nexport type MoveResource = {\n type: MoveResourceType;\n data: {};\n};\n\nexport type AccountData = {\n sequence_number: string;\n authentication_key: string;\n};\n\nexport type MoveModuleBytecode = {\n bytecode: string;\n abi?: MoveModule;\n};\n\n/**\n * TRANSACTION TYPES\n */\n\nexport enum TransactionResponseType {\n Pending = \"pending_transaction\",\n User = \"user_transaction\",\n Genesis = \"genesis_transaction\",\n BlockMetadata = \"block_metadata_transaction\",\n StateCheckpoint = \"state_checkpoint_transaction\",\n}\n\nexport type TransactionResponse =\n | PendingTransactionResponse\n | UserTransactionResponse\n | GenesisTransactionResponse\n | BlockMetadataTransactionResponse\n | StateCheckpointTransactionResponse;\n\nexport type PendingTransactionResponse = {\n type: TransactionResponseType.Pending;\n hash: string;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n};\n\nexport type UserTransactionResponse = {\n type: TransactionResponseType.User;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n /**\n * Events generated by the transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\nexport type GenesisTransactionResponse = {\n type: TransactionResponseType.Genesis;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n payload: GenesisPayload;\n /**\n * Events emitted during genesis\n */\n events: Array<Event>;\n};\n\nexport type BlockMetadataTransactionResponse = {\n type: TransactionResponseType.BlockMetadata;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n id: string;\n epoch: string;\n round: string;\n /**\n * The events emitted at the block creation\n */\n events: Array<Event>;\n /**\n * Previous block votes\n */\n previous_block_votes_bitvec: Array<number>;\n proposer: string;\n /**\n * The indices of the proposers who failed to propose\n */\n failed_proposer_indices: Array<number>;\n timestamp: string;\n};\n\nexport type StateCheckpointTransactionResponse = {\n type: TransactionResponseType.StateCheckpoint;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n};\n\n/**\n * WRITESET CHANGE TYPES\n */\n\nexport type WriteSetChange =\n | WriteSetChangeDeleteModule\n | WriteSetChangeDeleteResource\n | WriteSetChangeDeleteTableItem\n | WriteSetChangeWriteModule\n | WriteSetChangeWriteResource\n | WriteSetChangeWriteTableItem;\n\nexport type WriteSetChangeDeleteModule = {\n type: string;\n address: string;\n /**\n * State key hash\n */\n state_key_hash: string;\n module: MoveModuleId;\n};\n\nexport type WriteSetChangeDeleteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n resource: string;\n};\n\nexport type WriteSetChangeDeleteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n data?: DeletedTableData;\n};\n\nexport type WriteSetChangeWriteModule = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveModuleBytecode;\n};\n\nexport type WriteSetChangeWriteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveResource;\n};\n\nexport type WriteSetChangeWriteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n value: string;\n data?: DecodedTableData;\n};\n\nexport type DecodedTableData = {\n /**\n * Key of table in JSON\n */\n key: any;\n /**\n * Type of key\n */\n key_type: string;\n /**\n * Value of table in JSON\n */\n value: any;\n /**\n * Type of value\n */\n value_type: string;\n};\n\n/**\n * Deleted table data\n */\nexport type DeletedTableData = {\n /**\n * Deleted key\n */\n key: any;\n /**\n * Deleted key type\n */\n key_type: string;\n};\n\nexport type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;\n\nexport type EntryFunctionPayloadResponse = {\n type: string;\n function: MoveResourceType;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type ScriptPayloadResponse = {\n type: string;\n code: MoveScriptBytecode;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type MultisigPayloadResponse = {\n type: string;\n multisig_address: string;\n transaction_payload?: EntryFunctionPayloadResponse;\n};\n\nexport type GenesisPayload = {\n type: string;\n write_set: WriteSet;\n};\n\n/**\n * Move script bytecode\n */\nexport type MoveScriptBytecode = {\n bytecode: string;\n abi?: MoveFunction;\n};\n\n/**\n * These are the JSON representations of transaction signatures returned from the node API.\n */\nexport type TransactionSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature\n | TransactionMultiAgentSignature\n | TransactionFeePayerSignature;\n\nexport type TransactionEd25519Signature = {\n type: string;\n public_key: string;\n signature: \"ed25519_signature\";\n};\n\nexport type TransactionSecp256k1Signature = {\n type: string;\n public_key: string;\n signature: \"secp256k1_ecdsa_signature\";\n};\n\nexport type TransactionMultiEd25519Signature = {\n type: \"multi_ed25519_signature\";\n /**\n * The public keys for the Ed25519 signature\n */\n public_keys: Array<string>;\n /**\n * Signature associated with the public keys in the same order\n */\n signatures: Array<string>;\n /**\n * The number of signatures required for a successful transaction\n */\n threshold: number;\n bitmap: string;\n};\n\nexport type TransactionMultiAgentSignature = {\n type: \"multi_agent_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n};\n\nexport type TransactionFeePayerSignature = {\n type: \"fee_payer_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n fee_payer_address: string;\n fee_payer_signer: AccountSignature;\n};\n\n/**\n * The union of all single account signatures.\n */\nexport type AccountSignature = AccountEd25519Signature | AccountSecp256k1Signature | AccountMultiEd25519Signature;\n\nexport type AccountEd25519Signature = TransactionEd25519Signature;\n\nexport type AccountSecp256k1Signature = TransactionSecp256k1Signature;\n\nexport type AccountMultiEd25519Signature = TransactionMultiEd25519Signature;\n\nexport type WriteSet = ScriptWriteSet | DirectWriteSet;\n\nexport type ScriptWriteSet = {\n type: string;\n execute_as: string;\n script: ScriptPayloadResponse;\n};\n\nexport type DirectWriteSet = {\n type: string;\n changes: Array<WriteSetChange>;\n events: Array<Event>;\n};\n\nexport type EventGuid = {\n creation_number: string;\n account_address: string;\n};\n\nexport type Event = {\n guid: EventGuid;\n sequence_number: string;\n type: string;\n /**\n * The JSON representation of the event\n */\n data: any;\n};\n\n/**\n * Map of Move types to local TypeScript types\n */\nexport type MoveUint8Type = number;\nexport type MoveUint16Type = number;\nexport type MoveUint32Type = number;\nexport type MoveUint64Type = string;\nexport type MoveUint128Type = string;\nexport type MoveUint256Type = string;\nexport type MoveAddressType = string;\nexport type MoveObjectType = string;\nexport type MoveStructType = `${string}::${string}::${string}`;\nexport type MoveOptionType = MoveType | null | undefined;\n/**\n * String representation of a on-chain Move struct type.\n */\nexport type MoveResourceType = `${string}::${string}::${string}`;\n\nexport type MoveType =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | Array<MoveType>;\n\n/**\n * Possible Move values acceptable by move functions (entry, view)\n *\n * Map of a Move value to the corresponding TypeScript value\n *\n * `Bool -> boolean`\n *\n * `u8, u16, u32 -> number`\n *\n * `u64, u128, u256 -> string`\n *\n * `String -> string`\n *\n * `Address -> 0x${string}`\n *\n * `Struct - 0x${string}::${string}::${string}`\n *\n * `Object -> 0x${string}`\n *\n * `Vector -> Array<MoveValue>`\n *\n * `Option -> MoveValue | null | undefined`\n */\nexport type MoveValue =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | MoveOptionType\n | Array<MoveValue>;\n\n/**\n * Move module id is a string representation of Move module.\n * Module name is case-sensitive.\n */\nexport type MoveModuleId = `${string}::${string}`;\n\n/**\n * Move function visibility\n */\nexport enum MoveFunctionVisibility {\n PRIVATE = \"private\",\n PUBLIC = \"public\",\n FRIEND = \"friend\",\n}\n\n/**\n * Move function ability\n */\nexport enum MoveAbility {\n STORE = \"store\",\n DROP = \"drop\",\n KEY = \"key\",\n COPY = \"copy\",\n}\n\n/**\n * Move abilities tied to the generic type param and associated with the function that uses it\n */\nexport type MoveFunctionGenericTypeParam = {\n constraints: Array<MoveAbility>;\n};\n\n/**\n * Move struct field\n */\nexport type MoveStructField = {\n name: string;\n type: string;\n};\n\n/**\n * A Move module\n */\nexport type MoveModule = {\n address: string;\n name: string;\n /**\n * Friends of the module\n */\n friends: Array<MoveModuleId>;\n /**\n * Public functions of the module\n */\n exposed_functions: Array<MoveFunction>;\n /**\n * Structs of the module\n */\n structs: Array<MoveStruct>;\n};\n\n/**\n * A move struct\n */\nexport type MoveStruct = {\n name: string;\n /**\n * Whether the struct is a native struct of Move\n */\n is_native: boolean;\n /**\n * Abilities associated with the struct\n */\n abilities: Array<MoveAbility>;\n /**\n * Generic types associated with the struct\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Fields associated with the struct\n */\n fields: Array<MoveStructField>;\n};\n\n/**\n * Move function\n */\nexport type MoveFunction = {\n name: string;\n visibility: MoveFunctionVisibility;\n /**\n * Whether the function can be called as an entry function directly in a transaction\n */\n is_entry: boolean;\n /**\n * Whether the function is a view function or not\n */\n is_view: boolean;\n /**\n * Generic type params associated with the Move function\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Parameters associated with the move function\n */\n params: Array<string>;\n /**\n * Return type of the function\n */\n return: Array<string>;\n};\n\nexport enum RoleType {\n VALIDATOR = \"validator\",\n FULL_NODE = \"full_node\",\n}\n\nexport type LedgerInfo = {\n /**\n * Chain ID of the current chain\n */\n chain_id: number;\n epoch: string;\n ledger_version: string;\n oldest_ledger_version: string;\n ledger_timestamp: string;\n node_role: RoleType;\n oldest_block_height: string;\n block_height: string;\n /**\n * Git hash of the build of the API endpoint. Can be used to determine the exact\n * software version used by the API endpoint.\n */\n git_hash?: string;\n};\n\n/**\n * A Block type\n */\nexport type Block = {\n block_height: string;\n block_hash: string;\n block_timestamp: string;\n first_version: string;\n last_version: string;\n /**\n * The transactions in the block in sequential order\n */\n transactions?: Array<TransactionResponse>;\n};\n\n/**\n * The data needed to generate a View Request payload\n */\nexport type ViewRequestData = {\n function: MoveStructType;\n typeArguments?: Array<MoveResourceType>;\n functionArguments?: Array<MoveValue>;\n};\n\n// REQUEST TYPES\n\n/**\n * View request for the Move view function API\n *\n * `type MoveResourceType = ${string}::${string}::${string}`;\n */\nexport type ViewRequest = {\n function: MoveResourceType;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<MoveResourceType>;\n /**\n * Arguments of the function\n */\n functionArguments: Array<MoveValue>;\n};\n\n/**\n * Table Item request for the GetTableItem API\n */\nexport type TableItemRequest = {\n key_type: MoveValue;\n value_type: MoveValue;\n /**\n * The value of the table item's key\n */\n key: any;\n};\n\n/**\n * A list of Authentication Key schemes that are supported by Aptos.\n *\n * They are combinations of signing schemes and derive schemes.\n */\nexport type AuthenticationKeyScheme = SigningScheme | DeriveScheme;\n\nexport enum SigningScheme {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For SingleKey ecdsa\n */\n SingleKey = 2,\n}\n\nexport enum SigningSchemeInput {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For Secp256k1Ecdsa\n */\n Secp256k1Ecdsa = 2,\n}\n\n/**\n * Scheme used for deriving account addresses from other data\n */\nexport enum DeriveScheme {\n /**\n * Derives an address using an AUID, used for objects\n */\n DeriveAuid = 251,\n /**\n * Derives an address from another object address\n */\n DeriveObjectAddressFromObject = 252,\n /**\n * Derives an address from a GUID, used for objects\n */\n DeriveObjectAddressFromGuid = 253,\n /**\n * Derives an address from seed bytes, used for named objects\n */\n DeriveObjectAddressFromSeed = 254,\n /**\n * Derives an address from seed bytes, used for resource accounts\n */\n DeriveResourceAccountAddress = 255,\n}\n\nexport type WaitForTransactionOptions = {\n timeoutSecs?: number;\n checkSuccess?: boolean;\n indexerVersionCheck?: boolean;\n};\n/**\n * Account input type to generate an account using Legacy\n * Ed25519 or MultiEd25519 keys or without a specified `scheme`.\n * If `scheme` is not specified, we default to ED25519\n * In this case `legacy` is always true\n */\nexport type GenerateAccountWithLegacyKey = {\n scheme?: SigningSchemeInput.Ed25519 | SigningSchemeInput.MultiEd25519;\n legacy: true;\n};\n\n/**\n * Account input type to generate an account using Unified\n * Secp256k1Ecdsa key\n * In this case `legacy` is always false\n */\nexport type GenerateAccountWithUnifiedKey = {\n scheme: SigningSchemeInput.Secp256k1Ecdsa | SigningSchemeInput.Ed25519;\n legacy?: false;\n};\n\n/**\n * Unify GenerateAccount type for Legacy and Unified keys\n */\nexport type GenerateAccount = GenerateAccountWithLegacyKey | GenerateAccountWithUnifiedKey;\n"],"mappings":"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","names":["MimeType","TypeTagVariants","ScriptTransactionArgumentVariants","TransactionPayloadVariants","TransactionVariants","TransactionAuthenticatorVariant","AccountAuthenticatorVariant","AnyPublicKeyVariant","AnySignatureVariant","TransactionResponseType","MoveFunctionVisibility","MoveAbility","RoleType","SigningScheme","SigningSchemeInput","DeriveScheme"]}
|
package/package.json
CHANGED