@amadeus-protocol/sdk 1.0.8 → 1.1.1

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.
Files changed (200) hide show
  1. package/README.md +215 -30
  2. package/dist/api/chain.d.ts +144 -117
  3. package/dist/api/chain.d.ts.map +1 -1
  4. package/dist/api/chain.js +175 -146
  5. package/dist/api/chain.js.map +1 -1
  6. package/dist/api/contract.d.ts +78 -60
  7. package/dist/api/contract.d.ts.map +1 -1
  8. package/dist/api/contract.js +102 -75
  9. package/dist/api/contract.js.map +1 -1
  10. package/dist/api/epoch.d.ts +65 -66
  11. package/dist/api/epoch.d.ts.map +1 -1
  12. package/dist/api/epoch.js +90 -98
  13. package/dist/api/epoch.js.map +1 -1
  14. package/dist/api/peer.d.ts +77 -78
  15. package/dist/api/peer.d.ts.map +1 -1
  16. package/dist/api/peer.js +93 -94
  17. package/dist/api/peer.js.map +1 -1
  18. package/dist/api/proof.d.ts +44 -23
  19. package/dist/api/proof.d.ts.map +1 -1
  20. package/dist/api/proof.js +56 -29
  21. package/dist/api/proof.js.map +1 -1
  22. package/dist/api/transaction.d.ts +68 -69
  23. package/dist/api/transaction.d.ts.map +1 -1
  24. package/dist/api/transaction.js +84 -84
  25. package/dist/api/transaction.js.map +1 -1
  26. package/dist/api/wallet.d.ts +36 -37
  27. package/dist/api/wallet.d.ts.map +1 -1
  28. package/dist/api/wallet.js +47 -50
  29. package/dist/api/wallet.js.map +1 -1
  30. package/dist/client.d.ts +66 -68
  31. package/dist/client.d.ts.map +1 -1
  32. package/dist/client.js +231 -276
  33. package/dist/client.js.map +1 -1
  34. package/dist/constants.d.ts +13 -10
  35. package/dist/constants.d.ts.map +1 -1
  36. package/dist/constants.js +49 -45
  37. package/dist/constants.js.map +1 -1
  38. package/dist/contract-state.d.ts +6 -3
  39. package/dist/contract-state.d.ts.map +1 -1
  40. package/dist/contract-state.js +88 -106
  41. package/dist/contract-state.js.map +1 -1
  42. package/dist/contracts/abi-types.d.ts +32 -32
  43. package/dist/contracts/abi-types.d.ts.map +1 -1
  44. package/dist/contracts/coin.d.ts +13 -20
  45. package/dist/contracts/coin.d.ts.map +1 -1
  46. package/dist/contracts/coin.js +42 -38
  47. package/dist/contracts/coin.js.map +1 -1
  48. package/dist/contracts/contract-call.d.ts +14 -16
  49. package/dist/contracts/contract-call.d.ts.map +1 -1
  50. package/dist/contracts/contract-call.js +45 -54
  51. package/dist/contracts/contract-call.js.map +1 -1
  52. package/dist/contracts/contract.d.ts +24 -55
  53. package/dist/contracts/contract.d.ts.map +1 -1
  54. package/dist/contracts/contract.js +63 -101
  55. package/dist/contracts/contract.js.map +1 -1
  56. package/dist/contracts/lockup/abi.d.ts +54 -51
  57. package/dist/contracts/lockup/abi.d.ts.map +1 -1
  58. package/dist/contracts/lockup/abi.js +65 -74
  59. package/dist/contracts/lockup/abi.js.map +1 -1
  60. package/dist/contracts/lockup/helpers.d.ts +22 -18
  61. package/dist/contracts/lockup/helpers.d.ts.map +1 -1
  62. package/dist/contracts/lockup/helpers.js +44 -47
  63. package/dist/contracts/lockup/helpers.js.map +1 -1
  64. package/dist/contracts/lockup/parsers.d.ts +7 -3
  65. package/dist/contracts/lockup/parsers.d.ts.map +1 -1
  66. package/dist/contracts/lockup/parsers.js +51 -55
  67. package/dist/contracts/lockup/parsers.js.map +1 -1
  68. package/dist/contracts/lockup/storage-keys.d.ts +5 -2
  69. package/dist/contracts/lockup/storage-keys.d.ts.map +1 -1
  70. package/dist/contracts/lockup/storage-keys.js +54 -70
  71. package/dist/contracts/lockup/storage-keys.js.map +1 -1
  72. package/dist/contracts/lockup/types.d.ts +73 -70
  73. package/dist/contracts/lockup/types.d.ts.map +1 -1
  74. package/dist/contracts/lockup-prime/abi.d.ts +328 -325
  75. package/dist/contracts/lockup-prime/abi.d.ts.map +1 -1
  76. package/dist/contracts/lockup-prime/abi.js +397 -417
  77. package/dist/contracts/lockup-prime/abi.js.map +1 -1
  78. package/dist/contracts/lockup-prime/helpers.d.ts +35 -31
  79. package/dist/contracts/lockup-prime/helpers.d.ts.map +1 -1
  80. package/dist/contracts/lockup-prime/helpers.js +131 -137
  81. package/dist/contracts/lockup-prime/helpers.js.map +1 -1
  82. package/dist/contracts/lockup-prime/parsers.d.ts +9 -5
  83. package/dist/contracts/lockup-prime/parsers.d.ts.map +1 -1
  84. package/dist/contracts/lockup-prime/parsers.js +61 -61
  85. package/dist/contracts/lockup-prime/parsers.js.map +1 -1
  86. package/dist/contracts/lockup-prime/storage-keys.d.ts +7 -4
  87. package/dist/contracts/lockup-prime/storage-keys.d.ts.map +1 -1
  88. package/dist/contracts/lockup-prime/storage-keys.js +64 -80
  89. package/dist/contracts/lockup-prime/storage-keys.js.map +1 -1
  90. package/dist/contracts/lockup-prime/types.d.ts +92 -89
  91. package/dist/contracts/lockup-prime/types.d.ts.map +1 -1
  92. package/dist/contracts/lockup-prime/types.js +12 -13
  93. package/dist/contracts/lockup-prime/types.js.map +1 -1
  94. package/dist/contracts/nft/abi.d.ts +104 -0
  95. package/dist/contracts/nft/abi.d.ts.map +1 -0
  96. package/dist/contracts/nft/abi.js +135 -0
  97. package/dist/contracts/nft/abi.js.map +1 -0
  98. package/dist/contracts/nft/helpers.d.ts +21 -0
  99. package/dist/contracts/nft/helpers.d.ts.map +1 -0
  100. package/dist/contracts/nft/helpers.js +61 -0
  101. package/dist/contracts/nft/helpers.js.map +1 -0
  102. package/dist/contracts/nft/types.d.ts +47 -0
  103. package/dist/contracts/nft/types.d.ts.map +1 -0
  104. package/dist/conversion.d.ts +5 -2
  105. package/dist/conversion.d.ts.map +1 -1
  106. package/dist/conversion.js +45 -50
  107. package/dist/conversion.js.map +1 -1
  108. package/dist/crypto.d.ts +14 -16
  109. package/dist/crypto.d.ts.map +1 -1
  110. package/dist/crypto.js +121 -140
  111. package/dist/crypto.js.map +1 -1
  112. package/dist/encoding.d.ts +11 -8
  113. package/dist/encoding.d.ts.map +1 -1
  114. package/dist/encoding.js +123 -144
  115. package/dist/encoding.js.map +1 -1
  116. package/dist/encryption.d.ts +15 -12
  117. package/dist/encryption.d.ts.map +1 -1
  118. package/dist/encryption.js +119 -117
  119. package/dist/encryption.js.map +1 -1
  120. package/dist/explorer.d.ts +10 -7
  121. package/dist/explorer.d.ts.map +1 -1
  122. package/dist/explorer.js +51 -48
  123. package/dist/explorer.js.map +1 -1
  124. package/dist/formatters.d.ts +8 -5
  125. package/dist/formatters.d.ts.map +1 -1
  126. package/dist/formatters.js +67 -68
  127. package/dist/formatters.js.map +1 -1
  128. package/dist/index.d.ts +42 -55
  129. package/dist/index.js +39 -55
  130. package/dist/mnemonic.d.ts +12 -9
  131. package/dist/mnemonic.d.ts.map +1 -1
  132. package/dist/mnemonic.js +105 -114
  133. package/dist/mnemonic.js.map +1 -1
  134. package/dist/networks.d.ts +14 -17
  135. package/dist/networks.d.ts.map +1 -1
  136. package/dist/networks.js +40 -36
  137. package/dist/networks.js.map +1 -1
  138. package/dist/schemas.js +75 -79
  139. package/dist/schemas.js.map +1 -1
  140. package/dist/sdk.d.ts +69 -65
  141. package/dist/sdk.d.ts.map +1 -1
  142. package/dist/sdk.js +126 -117
  143. package/dist/sdk.js.map +1 -1
  144. package/dist/serialization.d.ts +8 -18
  145. package/dist/serialization.d.ts.map +1 -1
  146. package/dist/serialization.js +207 -260
  147. package/dist/serialization.js.map +1 -1
  148. package/dist/signing.js +67 -67
  149. package/dist/signing.js.map +1 -1
  150. package/dist/transaction-builder.d.ts +175 -184
  151. package/dist/transaction-builder.d.ts.map +1 -1
  152. package/dist/transaction-builder.js +295 -344
  153. package/dist/transaction-builder.js.map +1 -1
  154. package/dist/transaction-errors.d.ts +10 -12
  155. package/dist/transaction-errors.d.ts.map +1 -1
  156. package/dist/transaction-errors.js +145 -166
  157. package/dist/transaction-errors.js.map +1 -1
  158. package/dist/types.d.ts +530 -450
  159. package/dist/types.d.ts.map +1 -1
  160. package/dist/types.js +169 -183
  161. package/dist/types.js.map +1 -1
  162. package/dist/validation.d.ts +24 -26
  163. package/dist/validation.d.ts.map +1 -1
  164. package/dist/validation.js +194 -192
  165. package/dist/validation.js.map +1 -1
  166. package/package.json +4 -3
  167. package/dist/api/index.d.ts +0 -8
  168. package/dist/api/index.d.ts.map +0 -1
  169. package/dist/api/index.js +0 -8
  170. package/dist/api/index.js.map +0 -1
  171. package/dist/contracts/abi-types.js +0 -8
  172. package/dist/contracts/abi-types.js.map +0 -1
  173. package/dist/contracts/index.d.ts +0 -7
  174. package/dist/contracts/index.d.ts.map +0 -1
  175. package/dist/contracts/index.js +0 -7
  176. package/dist/contracts/index.js.map +0 -1
  177. package/dist/contracts/lockup/calls.d.ts +0 -23
  178. package/dist/contracts/lockup/calls.d.ts.map +0 -1
  179. package/dist/contracts/lockup/calls.js +0 -25
  180. package/dist/contracts/lockup/calls.js.map +0 -1
  181. package/dist/contracts/lockup/index.d.ts +0 -6
  182. package/dist/contracts/lockup/index.d.ts.map +0 -1
  183. package/dist/contracts/lockup/index.js +0 -6
  184. package/dist/contracts/lockup/index.js.map +0 -1
  185. package/dist/contracts/lockup/types.js +0 -7
  186. package/dist/contracts/lockup/types.js.map +0 -1
  187. package/dist/contracts/lockup-prime/calls.d.ts +0 -53
  188. package/dist/contracts/lockup-prime/calls.d.ts.map +0 -1
  189. package/dist/contracts/lockup-prime/calls.js +0 -60
  190. package/dist/contracts/lockup-prime/calls.js.map +0 -1
  191. package/dist/contracts/lockup-prime/index.d.ts +0 -6
  192. package/dist/contracts/lockup-prime/index.d.ts.map +0 -1
  193. package/dist/contracts/lockup-prime/index.js +0 -6
  194. package/dist/contracts/lockup-prime/index.js.map +0 -1
  195. package/dist/index.d.ts.map +0 -1
  196. package/dist/index.js.map +0 -1
  197. package/dist/schemas.d.ts +0 -67
  198. package/dist/schemas.d.ts.map +0 -1
  199. package/dist/signing.d.ts +0 -39
  200. package/dist/signing.d.ts.map +0 -1
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ //#region src/types.d.ts
1
2
  /**
2
3
  * Type Definitions
3
4
  *
@@ -6,676 +7,755 @@
6
7
  /**
7
8
  * Serializable value types for canonical encoding (VecPack)
8
9
  */
9
- export type SerializableValue = null | boolean | number | bigint | string | Uint8Array | SerializableValue[] | Map<SerializableValue, SerializableValue> | {
10
- [key: string]: SerializableValue;
10
+ type SerializableValue = null | boolean | number | bigint | string | Uint8Array | SerializableValue[] | Map<SerializableValue, SerializableValue> | {
11
+ [key: string]: SerializableValue;
11
12
  };
12
13
  /**
13
14
  * Decoded value types (Map is returned for objects during decode)
14
15
  */
15
- export type DecodedValue = null | boolean | bigint | Uint8Array | DecodedValue[] | Map<DecodedValue, DecodedValue>;
16
+ type DecodedValue = null | boolean | bigint | Uint8Array | DecodedValue[] | Map<DecodedValue, DecodedValue>;
16
17
  /**
17
18
  * Key pair structure containing public and private keys as Base58 strings
18
19
  */
19
- export interface KeyPair {
20
- /** Base58 encoded public key */
21
- publicKey: string;
22
- /** Base58 encoded private key (seed) */
23
- privateKey: string;
20
+ interface KeyPair {
21
+ /** Base58 encoded public key */
22
+ publicKey: string;
23
+ /** Base58 encoded private key (seed) */
24
+ privateKey: string;
24
25
  }
25
26
  /**
26
27
  * SDK configuration
27
28
  */
28
- export interface AmadeusSDKConfig {
29
- /** Base URL of the Amadeus node API (defaults to NODE_API_URL) */
30
- baseUrl?: string;
31
- /** Request timeout in milliseconds (default: 30000) */
32
- timeout?: number;
33
- /** Custom headers to include in requests */
34
- headers?: Record<string, string>;
29
+ interface AmadeusSDKConfig {
30
+ /** Base URL of the Amadeus node API (defaults to NODE_API_URL) */
31
+ baseUrl?: string;
32
+ /** Request timeout in milliseconds (default: 30000) */
33
+ timeout?: number;
34
+ /** Custom headers to include in requests */
35
+ headers?: Record<string, string>;
35
36
  }
36
37
  /**
37
38
  * API response wrapper
38
39
  * Note: Index signature needed for dynamic response properties
39
40
  */
40
- export interface ApiResponse {
41
- error: 'ok' | 'not_found' | string;
42
- [key: string]: unknown;
41
+ interface ApiResponse {
42
+ error: 'ok' | 'not_found' | string;
43
+ [key: string]: unknown;
43
44
  }
44
45
  /**
45
46
  * SDK error class
46
47
  */
47
- export declare class AmadeusSDKError extends Error {
48
- status?: number | undefined;
49
- response?: Record<string, unknown> | undefined;
50
- constructor(message: string, status?: number | undefined, response?: Record<string, unknown> | undefined);
48
+ declare class AmadeusSDKError extends Error {
49
+ status?: number | undefined;
50
+ response?: Record<string, unknown> | undefined;
51
+ constructor(message: string, status?: number | undefined, response?: Record<string, unknown> | undefined);
51
52
  }
52
53
  /**
53
54
  * Transaction validation error codes
54
55
  */
55
- export declare enum TransactionValidationError {
56
- OK = "ok",
57
- TOO_LARGE = "too_large",
58
- TX_NOT_CANONICAL = "tx_not_canonical",
59
- INVALID_HASH = "invalid_hash",
60
- INVALID_SIGNATURE = "invalid_signature",
61
- NONCE_NOT_INTEGER = "nonce_not_integer",
62
- NONCE_TOO_HIGH = "nonce_too_high",
63
- ACTIONS_MUST_BE_LIST = "actions_must_be_list",
64
- ACTIONS_LENGTH_MUST_BE_1 = "actions_length_must_be_1",
65
- OP_MUST_BE_CALL = "op_must_be_call",
66
- CONTRACT_MUST_BE_BINARY = "contract_must_be_binary",
67
- FUNCTION_MUST_BE_BINARY = "function_must_be_binary",
68
- ARGS_MUST_BE_LIST = "args_must_be_list",
69
- ARG_MUST_BE_BINARY = "arg_must_be_binary",
70
- INVALID_MODULE = "invalid_module",
71
- INVALID_FUNCTION = "invalid_function",
72
- INVALID_MODULE_FOR_SPECIAL_MEETING = "invalid_module_for_special_meeting",
73
- INVALID_FUNCTION_FOR_SPECIAL_MEETING = "invalid_function_for_special_meeting",
74
- UNKNOWN = "unknown"
56
+ declare enum TransactionValidationError {
57
+ OK = "ok",
58
+ TOO_LARGE = "too_large",
59
+ TX_NOT_CANONICAL = "tx_not_canonical",
60
+ INVALID_HASH = "invalid_hash",
61
+ INVALID_SIGNATURE = "invalid_signature",
62
+ NONCE_NOT_INTEGER = "nonce_not_integer",
63
+ NONCE_TOO_HIGH = "nonce_too_high",
64
+ ACTIONS_MUST_BE_LIST = "actions_must_be_list",
65
+ ACTIONS_LENGTH_MUST_BE_1 = "actions_length_must_be_1",
66
+ OP_MUST_BE_CALL = "op_must_be_call",
67
+ CONTRACT_MUST_BE_BINARY = "contract_must_be_binary",
68
+ FUNCTION_MUST_BE_BINARY = "function_must_be_binary",
69
+ ARGS_MUST_BE_LIST = "args_must_be_list",
70
+ ARG_MUST_BE_BINARY = "arg_must_be_binary",
71
+ INVALID_MODULE = "invalid_module",
72
+ INVALID_FUNCTION = "invalid_function",
73
+ INVALID_MODULE_FOR_SPECIAL_MEETING = "invalid_module_for_special_meeting",
74
+ INVALID_FUNCTION_FOR_SPECIAL_MEETING = "invalid_function_for_special_meeting",
75
+ UNKNOWN = "unknown"
75
76
  }
76
77
  /**
77
78
  * Transaction execution error codes.
78
79
  * These are returned when contract execution fails.
79
80
  */
80
- export declare enum TransactionExecutionError {
81
- /** Success - execution completed successfully */
82
- OK = "ok",
83
- /** Unknown error (when panic payload cannot be converted to string) */
84
- UNKNOWN = "unknown",
85
- /** Contract execution was aborted */
86
- AS_ABORT = "as_abort",
87
- EXEC_INVALID_AMOUNT_NEGATIVE = "exec_invalid_amount_negative",
88
- EXEC_INSUFFICIENT_EXEC_BUDGET = "exec_insufficient_exec_budget",
89
- EXEC_CRITICAL_UNDERFLOW = "exec_critical_underflow",
90
- EXEC_STORAGE_INVALID_AMOUNT_NEGATIVE = "exec_storage_invalid_amount_negative",
91
- EXEC_INSUFFICIENT_STORAGE_BUDGET = "exec_insufficient_storage_budget",
92
- EXEC_STORAGE_CRITICAL_UNDERFLOW = "exec_storage_critical_underflow",
93
- EXEC_TOO_LARGE_KEY_SIZE = "exec_too_large_key_size",
94
- EXEC_TOO_LARGE_VALUE_SIZE = "exec_too_large_value_size",
95
- EXEC_KV_PUT_FAILED = "exec_kv_put_failed",
96
- EXEC_KV_INCREMENT_FAILED = "exec_kv_increment_failed",
97
- EXEC_KV_INCREMENT_INVALID_INTEGER = "exec_kv_increment_invalid_integer",
98
- EXEC_KV_INCREMENT_INTEGER_OVERFLOW = "exec_kv_increment_integer_overflow",
99
- KV_PUT_FAILED = "kv_put_failed",
100
- EXEC_KV_DELETE_FAILED = "exec_kv_delete_failed",
101
- EXEC_KV_SET_BIT_FAILED = "exec_kv_set_bit_failed",
102
- EXEC_CANNOT_WRITE_DURING_VIEW = "exec_cannot_write_during_view",
103
- EXEC_RETURN_VALUE_TOO_LARGE = "exec_return_value_too_large",
104
- EXEC_INSTANCE_NOT_INJECTED = "exec_instance_not_injected",
105
- EXEC_PTR_TERM_TOO_SHORT = "exec_ptr_term_too_short",
106
- EXEC_PTR_TERM_TOO_LONG = "exec_ptr_term_too_long",
107
- EXEC_LOG_INVALID_PTR = "exec_log_invalid_ptr",
108
- EXEC_CALL_TABLE_INVALID_PTR = "exec_call_table_invalid_ptr",
109
- EXEC_CALL_TOO_MANY_ARGS = "exec_call_too_many_args",
110
- EXEC_READ_CALL_TABLE_ERROR = "exec_read_call_table_error",
111
- EXEC_CALL_PTR_TERM_TOO_LONG = "exec_call_ptr_term_too_long",
112
- EXEC_READ_CALL_TABLE_DATA_ERROR = "exec_read_call_table_data_error",
113
- EXEC_CALL_EXTRA_INVALID = "exec_call_extra_invalid",
114
- EXEC_CALL_EXTRA_TOO_MANY = "exec_call_extra_too_many",
115
- EXEC_READ_EXTRA_ROW = "exec_read_extra_row",
116
- EXEC_READ_EXTRA_DATA = "exec_read_extra_data",
117
- EXEC_CALL_MISSING_ARGS = "exec_call_missing_args",
118
- EXEC_MEMWRITE = "exec_memwrite",
119
- EXEC_LOG_MSG_SIZE_EXCEEDED = "exec_log_msg_size_exceeded",
120
- EXEC_LOGS_TOTAL_SIZE_EXCEEDED = "exec_logs_total_size_exceeded",
121
- EXEC_LOGS_TOTAL_ELEMENTS_EXCEEDED = "exec_logs_total_elements_exceeded",
122
- EXEC_INVALID_MODULE = "exec_invalid_module",
123
- EXEC_MEMORY_ALLOC = "exec_memory_alloc",
124
- EXEC_ARG_LEN_WRITE = "exec_arg_len_write",
125
- EXEC_ARG_WRITE = "exec_arg_write",
126
- EXEC_INSTANCE = "exec_instance",
127
- EXEC_INIT_MEMWRITE = "exec_init_memwrite",
128
- EXEC_DESERIALIZE_ERR = "exec_deserialize_err",
129
- EXEC_SERIALIZE_ERR = "exec_serialize_err",
130
- EXEC_FUNCTION_NOT_FOUND = "exec_function_not_found",
131
- EXEC_ERROR = "exec_error",
132
- INVALID_EPOCH = "invalid_epoch",
133
- INVALID_BIC_ACTION = "invalid_bic_action",
134
- INVALID_FUNCTION = "invalid_function",
135
- ACCOUNT_HAS_NO_BYTECODE = "account_has_no_bytecode",
136
- INVALID_ATTACHED_AMOUNT = "invalid_attached_amount",
137
- ATTACHED_AMOUNT_INSUFFICIENT_FUNDS = "attached_amount_insufficient_funds",
138
- WASM_NOOP = "wasm_noop",
139
- INVALID_BYTECODE = "invalid_bytecode",
140
- INVALID_ARGS = "invalid_args",
141
- INVALID_AMOUNT = "invalid_amount",
142
- INVALID_RECEIVER_PK = "invalid_receiver_pk",
143
- INSUFFICIENT_FUNDS = "insufficient_funds",
144
- PAUSED = "paused",
145
- SOULBOUND = "soulbound",
146
- INVALID_BALANCE = "invalid_balance",
147
- INVALID_TOTAL_SUPPLY = "invalid_total_supply",
148
- INVALID_SYMBOL = "invalid_symbol",
149
- SYMBOL_TOO_SHORT = "symbol_too_short",
150
- SYMBOL_TOO_LONG = "symbol_too_long",
151
- SYMBOL_RESERVED = "symbol_reserved",
152
- SYMBOL_EXISTS = "symbol_exists",
153
- INVALID_DECIMALS = "invalid_decimals",
154
- NO_PERMISSIONS = "no_permissions",
155
- SYMBOL_DOESNT_EXIST = "symbol_doesnt_exist",
156
- NOT_MINTABLE = "not_mintable",
157
- INVALID_DIRECTION = "invalid_direction",
158
- NOT_PAUSABLE = "not_pausable",
159
- INVALID_DURATION = "invalid_duration",
160
- INVALID_VAULT = "invalid_vault",
161
- INVALID_UNLOCK_HEIGHT = "invalid_unlock_height",
162
- INVALID_UNLOCK_AMOUNT = "invalid_unlock_amount",
163
- VAULT_IS_LOCKED = "vault_is_locked",
164
- INVALID_TIER = "invalid_tier",
165
- INVALID_MULTIPLIER = "invalid_multiplier",
166
- INVALID_UNLOCK_EPOCH = "invalid_unlock_epoch",
167
- INVALID_NEXT_CHECKIN_EPOCH = "invalid_next_checkin_epoch",
168
- INSUFFICIENT_TOKENS = "insufficient_tokens",
169
- INVALID_COLLECTION = "invalid_collection",
170
- COLLECTION_TOO_SHORT = "collection_too_short",
171
- COLLECTION_TOO_LONG = "collection_too_long",
172
- COLLECTION_RESERVED = "collection_reserved",
173
- COLLECTION_EXISTS = "collection_exists",
174
- COLLECTION_DOESNT_EXIST = "collection_doesnt_exist",
175
- INVALID_INTEGER = "invalid_integer"
81
+ declare enum TransactionExecutionError {
82
+ /** Success - execution completed successfully */
83
+ OK = "ok",
84
+ /** Unknown error (when panic payload cannot be converted to string) */
85
+ UNKNOWN = "unknown",
86
+ /** Contract execution was aborted */
87
+ AS_ABORT = "as_abort",
88
+ EXEC_INVALID_AMOUNT_NEGATIVE = "exec_invalid_amount_negative",
89
+ EXEC_INSUFFICIENT_EXEC_BUDGET = "exec_insufficient_exec_budget",
90
+ EXEC_CRITICAL_UNDERFLOW = "exec_critical_underflow",
91
+ EXEC_STORAGE_INVALID_AMOUNT_NEGATIVE = "exec_storage_invalid_amount_negative",
92
+ EXEC_INSUFFICIENT_STORAGE_BUDGET = "exec_insufficient_storage_budget",
93
+ EXEC_STORAGE_CRITICAL_UNDERFLOW = "exec_storage_critical_underflow",
94
+ EXEC_TOO_LARGE_KEY_SIZE = "exec_too_large_key_size",
95
+ EXEC_TOO_LARGE_VALUE_SIZE = "exec_too_large_value_size",
96
+ EXEC_KV_PUT_FAILED = "exec_kv_put_failed",
97
+ EXEC_KV_INCREMENT_FAILED = "exec_kv_increment_failed",
98
+ EXEC_KV_INCREMENT_INVALID_INTEGER = "exec_kv_increment_invalid_integer",
99
+ EXEC_KV_INCREMENT_INTEGER_OVERFLOW = "exec_kv_increment_integer_overflow",
100
+ KV_PUT_FAILED = "kv_put_failed",
101
+ EXEC_KV_DELETE_FAILED = "exec_kv_delete_failed",
102
+ EXEC_KV_SET_BIT_FAILED = "exec_kv_set_bit_failed",
103
+ EXEC_CANNOT_WRITE_DURING_VIEW = "exec_cannot_write_during_view",
104
+ EXEC_RETURN_VALUE_TOO_LARGE = "exec_return_value_too_large",
105
+ EXEC_INSTANCE_NOT_INJECTED = "exec_instance_not_injected",
106
+ EXEC_PTR_TERM_TOO_SHORT = "exec_ptr_term_too_short",
107
+ EXEC_PTR_TERM_TOO_LONG = "exec_ptr_term_too_long",
108
+ EXEC_LOG_INVALID_PTR = "exec_log_invalid_ptr",
109
+ EXEC_CALL_TABLE_INVALID_PTR = "exec_call_table_invalid_ptr",
110
+ EXEC_CALL_TOO_MANY_ARGS = "exec_call_too_many_args",
111
+ EXEC_READ_CALL_TABLE_ERROR = "exec_read_call_table_error",
112
+ EXEC_CALL_PTR_TERM_TOO_LONG = "exec_call_ptr_term_too_long",
113
+ EXEC_READ_CALL_TABLE_DATA_ERROR = "exec_read_call_table_data_error",
114
+ EXEC_CALL_EXTRA_INVALID = "exec_call_extra_invalid",
115
+ EXEC_CALL_EXTRA_TOO_MANY = "exec_call_extra_too_many",
116
+ EXEC_READ_EXTRA_ROW = "exec_read_extra_row",
117
+ EXEC_READ_EXTRA_DATA = "exec_read_extra_data",
118
+ EXEC_CALL_MISSING_ARGS = "exec_call_missing_args",
119
+ EXEC_MEMWRITE = "exec_memwrite",
120
+ EXEC_LOG_MSG_SIZE_EXCEEDED = "exec_log_msg_size_exceeded",
121
+ EXEC_LOGS_TOTAL_SIZE_EXCEEDED = "exec_logs_total_size_exceeded",
122
+ EXEC_LOGS_TOTAL_ELEMENTS_EXCEEDED = "exec_logs_total_elements_exceeded",
123
+ EXEC_INVALID_MODULE = "exec_invalid_module",
124
+ EXEC_MEMORY_ALLOC = "exec_memory_alloc",
125
+ EXEC_ARG_LEN_WRITE = "exec_arg_len_write",
126
+ EXEC_ARG_WRITE = "exec_arg_write",
127
+ EXEC_INSTANCE = "exec_instance",
128
+ EXEC_INIT_MEMWRITE = "exec_init_memwrite",
129
+ EXEC_DESERIALIZE_ERR = "exec_deserialize_err",
130
+ EXEC_SERIALIZE_ERR = "exec_serialize_err",
131
+ EXEC_FUNCTION_NOT_FOUND = "exec_function_not_found",
132
+ EXEC_ERROR = "exec_error",
133
+ INVALID_EPOCH = "invalid_epoch",
134
+ INVALID_BIC_ACTION = "invalid_bic_action",
135
+ INVALID_FUNCTION = "invalid_function",
136
+ ACCOUNT_HAS_NO_BYTECODE = "account_has_no_bytecode",
137
+ INVALID_ATTACHED_AMOUNT = "invalid_attached_amount",
138
+ ATTACHED_AMOUNT_INSUFFICIENT_FUNDS = "attached_amount_insufficient_funds",
139
+ WASM_NOOP = "wasm_noop",
140
+ INVALID_BYTECODE = "invalid_bytecode",
141
+ INVALID_ARGS = "invalid_args",
142
+ INVALID_AMOUNT = "invalid_amount",
143
+ INVALID_RECEIVER_PK = "invalid_receiver_pk",
144
+ INSUFFICIENT_FUNDS = "insufficient_funds",
145
+ PAUSED = "paused",
146
+ SOULBOUND = "soulbound",
147
+ INVALID_BALANCE = "invalid_balance",
148
+ INVALID_TOTAL_SUPPLY = "invalid_total_supply",
149
+ INVALID_SYMBOL = "invalid_symbol",
150
+ SYMBOL_TOO_SHORT = "symbol_too_short",
151
+ SYMBOL_TOO_LONG = "symbol_too_long",
152
+ SYMBOL_RESERVED = "symbol_reserved",
153
+ SYMBOL_EXISTS = "symbol_exists",
154
+ INVALID_DECIMALS = "invalid_decimals",
155
+ NO_PERMISSIONS = "no_permissions",
156
+ SYMBOL_DOESNT_EXIST = "symbol_doesnt_exist",
157
+ NOT_MINTABLE = "not_mintable",
158
+ INVALID_DIRECTION = "invalid_direction",
159
+ NOT_PAUSABLE = "not_pausable",
160
+ INVALID_DURATION = "invalid_duration",
161
+ INVALID_VAULT = "invalid_vault",
162
+ INVALID_UNLOCK_HEIGHT = "invalid_unlock_height",
163
+ INVALID_UNLOCK_AMOUNT = "invalid_unlock_amount",
164
+ VAULT_IS_LOCKED = "vault_is_locked",
165
+ INVALID_TIER = "invalid_tier",
166
+ INVALID_MULTIPLIER = "invalid_multiplier",
167
+ INVALID_UNLOCK_EPOCH = "invalid_unlock_epoch",
168
+ INVALID_NEXT_CHECKIN_EPOCH = "invalid_next_checkin_epoch",
169
+ INSUFFICIENT_TOKENS = "insufficient_tokens",
170
+ INVALID_COLLECTION = "invalid_collection",
171
+ COLLECTION_TOO_SHORT = "collection_too_short",
172
+ COLLECTION_TOO_LONG = "collection_too_long",
173
+ COLLECTION_RESERVED = "collection_reserved",
174
+ COLLECTION_EXISTS = "collection_exists",
175
+ COLLECTION_DOESNT_EXIST = "collection_doesnt_exist",
176
+ INVALID_INTEGER = "invalid_integer"
176
177
  }
177
178
  /**
178
179
  * Transaction event type
179
180
  */
180
- export declare enum TransactionEventType {
181
- SENT = "sent",
182
- RECEIVED = "recv"
181
+ declare enum TransactionEventType {
182
+ SENT = "sent",
183
+ RECEIVED = "recv"
183
184
  }
184
185
  /**
185
186
  * Contract names
186
187
  */
187
- export declare enum Contract {
188
- EPOCH = "Epoch",
189
- COIN = "Coin",
190
- CONTRACT = "Contract"
188
+ declare enum Contract {
189
+ EPOCH = "Epoch",
190
+ COIN = "Coin",
191
+ CONTRACT = "Contract"
191
192
  }
192
193
  /**
193
194
  * Contract function names
194
195
  */
195
- export declare enum ContractFunction {
196
- TRANSFER = "transfer",
197
- SUBMIT_SOL = "submit_sol",
198
- SET_EMISSION_ADDRESS = "set_emission_address",
199
- SLASH_TRAINER = "slash_trainer",
200
- DEPLOY = "deploy",
201
- CREATE_AND_MINT = "create_and_mint",
202
- MINT = "mint",
203
- PAUSE = "pause"
196
+ declare enum ContractFunction {
197
+ TRANSFER = "transfer",
198
+ SUBMIT_SOL = "submit_sol",
199
+ SET_EMISSION_ADDRESS = "set_emission_address",
200
+ SLASH_TRAINER = "slash_trainer",
201
+ DEPLOY = "deploy",
202
+ CREATE_AND_MINT = "create_and_mint",
203
+ MINT = "mint",
204
+ PAUSE = "pause"
204
205
  }
205
206
  /**
206
207
  * Transaction action structure (for building transactions)
207
208
  */
208
- export interface TransactionAction extends Record<string, SerializableValue> {
209
- op: 'call';
210
- contract: string;
211
- function: string;
212
- args: SerializableValue[];
209
+ interface TransactionAction extends Record<string, SerializableValue> {
210
+ op: 'call';
211
+ contract: string;
212
+ function: string;
213
+ args: SerializableValue[];
213
214
  }
214
215
  /**
215
216
  * Transaction action structure (as returned by API)
216
217
  */
217
- export interface TransactionActionResponse {
218
- op: 'call';
219
- contract: string;
220
- function: string | ContractFunction;
221
- args: (string | number | boolean)[];
222
- attached_symbol?: string;
223
- attached_amount?: string;
218
+ interface TransactionActionResponse {
219
+ op: 'call';
220
+ contract: string;
221
+ function: string | ContractFunction;
222
+ args: (string | number | boolean)[];
223
+ attached_symbol?: string;
224
+ attached_amount?: string;
224
225
  }
225
226
  /**
226
227
  * Transaction action structure (legacy/alternative format)
227
228
  */
228
- export interface TransactionActionBody {
229
- op: 'call';
230
- contract: string;
231
- function: ContractFunction;
232
- args: (string | Uint8Array)[];
229
+ interface TransactionActionBody {
230
+ op: 'call';
231
+ contract: string;
232
+ function: ContractFunction;
233
+ args: (string | Uint8Array)[];
233
234
  }
234
235
  /**
235
236
  * Transaction body structure
236
237
  */
237
- export interface TransactionBody {
238
- signer: Uint8Array | string;
239
- nonce: number;
240
- action: TransactionActionBody;
238
+ interface TransactionBody {
239
+ signer: Uint8Array | string;
240
+ nonce: number;
241
+ action: TransactionActionBody;
241
242
  }
242
243
  /**
243
244
  * Unsigned transaction structure
244
245
  */
245
- export interface UnsignedTransaction extends Record<string, SerializableValue> {
246
- signer: Uint8Array;
247
- nonce: bigint;
248
- action: TransactionAction;
246
+ interface UnsignedTransaction extends Record<string, SerializableValue> {
247
+ signer: Uint8Array;
248
+ nonce: bigint;
249
+ action: TransactionAction;
249
250
  }
250
251
  /**
251
252
  * Unsigned transaction with its hash
252
253
  */
253
- export interface UnsignedTransactionWithHash {
254
- /** Unsigned transaction structure */
255
- tx: UnsignedTransaction;
256
- /** Transaction hash as Uint8Array */
257
- hash: Uint8Array;
254
+ interface UnsignedTransactionWithHash {
255
+ /** Unsigned transaction structure */
256
+ tx: UnsignedTransaction;
257
+ /** Transaction hash as Uint8Array */
258
+ hash: Uint8Array;
258
259
  }
259
260
  /**
260
261
  * Packed transaction type
261
262
  */
262
- export type TransactionPacked = Uint8Array;
263
+ type TransactionPacked = Uint8Array;
263
264
  /**
264
265
  * Unpacked transaction structure
265
266
  */
266
- export interface TransactionUnpacked {
267
- tx: TransactionBody;
268
- tx_encoded: Uint8Array;
269
- hash: Uint8Array;
270
- signature: Uint8Array;
271
- metadata?: {
272
- entry_hash: Uint8Array | string;
273
- entry_height: number;
274
- tx_event?: TransactionEventType;
275
- };
267
+ interface TransactionUnpacked {
268
+ tx: TransactionBody;
269
+ tx_encoded: Uint8Array;
270
+ hash: Uint8Array;
271
+ signature: Uint8Array;
272
+ metadata?: {
273
+ entry_hash: Uint8Array | string;
274
+ entry_height: number;
275
+ tx_event?: TransactionEventType;
276
+ };
276
277
  }
277
278
  /**
278
279
  * Transaction validation result
279
280
  */
280
- export type TransactionValidationResult = {
281
- error: 'ok';
282
- txu: TransactionUnpacked;
281
+ type TransactionValidationResult = {
282
+ error: 'ok';
283
+ txu: TransactionUnpacked;
283
284
  } | {
284
- error: TransactionValidationError;
285
+ error: TransactionValidationError;
285
286
  };
286
287
  /**
287
288
  * Result of building a transaction
288
289
  */
289
- export interface BuildTransactionResult {
290
- /** Transaction hash as Base58 string */
291
- txHash: string;
292
- /** Packed transaction ready for submission */
293
- txPacked: Uint8Array;
290
+ interface BuildTransactionResult {
291
+ /** Transaction hash as Base58 string */
292
+ txHash: string;
293
+ /** Packed transaction ready for submission */
294
+ txPacked: Uint8Array;
294
295
  }
295
296
  /**
296
297
  * Input parameters for building a transfer transaction
297
298
  */
298
- export interface TransferTransactionInput {
299
- /** Base58 encoded sender private key (seed) */
300
- senderPrivkey: string;
301
- /** Base58 encoded recipient address */
302
- recipient: string;
303
- /** Amount in human-readable format */
304
- amount: number;
305
- /** Token symbol (e.g., 'AMA') */
306
- symbol: string;
299
+ interface TransferTransactionInput {
300
+ /** Base58 encoded sender private key (seed) */
301
+ senderPrivkey: string;
302
+ /** Base58 encoded recipient address */
303
+ recipient: string;
304
+ /** Amount in human-readable format */
305
+ amount: number;
306
+ /** Token symbol (e.g., 'AMA') */
307
+ symbol: string;
307
308
  }
308
- export interface LockupPrimeLockInput {
309
- senderPrivkey: string;
310
- amount: number | string;
311
- tier: string;
309
+ interface LockupPrimeLockInput {
310
+ senderPrivkey: string;
311
+ amount: number | string;
312
+ tier: string;
312
313
  }
313
- export interface LockupPrimeUnlockInput {
314
- senderPrivkey: string;
315
- vaultIndex: number;
314
+ interface LockupPrimeUnlockInput {
315
+ senderPrivkey: string;
316
+ vaultIndex: number;
316
317
  }
317
- export interface LockupPrimeDailyCheckinInput {
318
- senderPrivkey: string;
319
- vaultIndex: number;
318
+ interface LockupPrimeDailyCheckinInput {
319
+ senderPrivkey: string;
320
+ vaultIndex: number;
320
321
  }
321
- export interface LockupUnlockInput {
322
- senderPrivkey: string;
323
- vaultIndex: number;
322
+ interface LockupUnlockInput {
323
+ senderPrivkey: string;
324
+ vaultIndex: number;
324
325
  }
325
326
  /**
326
327
  * Transaction metadata
327
328
  */
328
- export interface TransactionMetadata {
329
- entry_hash: string;
330
- entry_height: number;
331
- tx_event?: TransactionEventType;
329
+ interface TransactionMetadata {
330
+ entry_hash: string;
331
+ entry_height: number;
332
+ tx_event?: TransactionEventType;
332
333
  }
333
334
  /**
334
335
  * Transaction receipt structure
335
336
  */
336
- export interface TransactionReceipt {
337
- /** Execution result */
338
- result: TransactionExecutionError | string;
339
- /** Execution logs (array of ASCII dump strings) */
340
- logs: string[];
341
- /** Success flag */
342
- success: boolean;
343
- /** Execution cost used */
344
- exec_used: string;
337
+ interface TransactionReceipt {
338
+ /** Execution result */
339
+ result: TransactionExecutionError | string;
340
+ /** Execution logs (array of ASCII dump strings) */
341
+ logs: string[];
342
+ /** Success flag */
343
+ success: boolean;
344
+ /** Execution cost used */
345
+ exec_used: string;
345
346
  }
346
347
  /**
347
348
  * Transaction result
348
349
  */
349
- export interface TransactionResult {
350
- error: TransactionValidationError | string;
350
+ interface TransactionResult {
351
+ error: TransactionValidationError | string;
351
352
  }
352
353
  /**
353
354
  * Transaction data returned from the API
354
355
  */
355
- export interface Transaction {
356
- /** Transaction hash (Base58 encoded) */
357
- hash: string;
358
- /** Transaction signature (Base58 encoded) */
359
- signature: string;
360
- /** Transaction data */
361
- tx: {
362
- /** Signer's public key (Base58 encoded) */
363
- signer: string;
364
- /** Transaction nonce */
365
- nonce: number;
366
- /** Transaction action */
367
- action: TransactionActionResponse;
368
- };
369
- /** Transaction metadata */
370
- metadata: TransactionMetadata;
371
- /** Transaction result @deprecated use receipt instead */
372
- result: TransactionResult;
373
- /** Transaction receipt (execution result and logs) */
374
- receipt: TransactionReceipt;
356
+ interface Transaction {
357
+ /** Transaction hash (Base58 encoded) */
358
+ hash: string;
359
+ /** Transaction signature (Base58 encoded) */
360
+ signature: string;
361
+ /** Transaction data */
362
+ tx: {
363
+ /** Signer's public key (Base58 encoded) */signer: string; /** Transaction nonce */
364
+ nonce: number; /** Transaction action */
365
+ action: TransactionActionResponse;
366
+ };
367
+ /** Transaction metadata */
368
+ metadata: TransactionMetadata;
369
+ /** Transaction result @deprecated use receipt instead */
370
+ result: TransactionResult;
371
+ /** Transaction receipt (execution result and logs) */
372
+ receipt: TransactionReceipt;
375
373
  }
376
374
  /**
377
375
  * Transaction event structure
378
376
  */
379
- export interface TransactionEvent {
380
- type: TransactionEventType;
381
- txid: string;
382
- amount: string;
383
- symbol: string;
384
- timestamp: number;
377
+ interface TransactionEvent {
378
+ type: TransactionEventType;
379
+ txid: string;
380
+ amount: string;
381
+ symbol: string;
382
+ timestamp: number;
385
383
  }
386
384
  /**
387
385
  * Transaction filters for querying transactions
388
386
  */
389
- export interface TransactionFilters {
390
- limit?: number;
391
- offset?: number;
392
- sort?: 'asc' | 'desc';
393
- cursor?: string;
394
- cursor_b58?: string;
395
- contract?: string | Contract;
396
- contract_b58?: string;
397
- function?: string | ContractFunction;
398
- type?: TransactionEventType;
387
+ interface TransactionFilters {
388
+ limit?: number;
389
+ offset?: number;
390
+ sort?: 'asc' | 'desc';
391
+ cursor?: string;
392
+ cursor_b58?: string;
393
+ contract?: string | Contract;
394
+ contract_b58?: string;
395
+ function?: string | ContractFunction;
396
+ type?: TransactionEventType;
399
397
  }
400
398
  /**
401
399
  * Chain entry header structure
402
400
  */
403
- export interface ChainEntryHeader {
404
- height: number;
405
- timestamp: number;
406
- mutations_hash: string;
407
- slot: number;
408
- prev_slot: number;
409
- prev_hash: string;
410
- dr: string;
411
- vr: string;
412
- signer: string;
413
- txs_hash: string;
414
- root_tx?: string;
415
- root_validator?: string;
401
+ interface ChainEntryHeader {
402
+ height: number;
403
+ timestamp: number;
404
+ mutations_hash: string;
405
+ slot: number;
406
+ prev_slot: number;
407
+ prev_hash: string;
408
+ dr: string;
409
+ vr: string;
410
+ signer: string;
411
+ txs_hash: string;
412
+ root_tx?: string;
413
+ root_validator?: string;
416
414
  }
417
415
  /**
418
416
  * Chain entry structure
419
417
  */
420
- export interface ChainEntry {
421
- hash: string;
422
- height: number;
423
- timestamp: number;
424
- mutations_hash: string;
425
- tx_count?: number;
426
- mask?: string;
427
- consensus?: {
428
- score: number;
429
- finality_reached: boolean;
430
- mut_hash: string;
431
- };
432
- header_unpacked: ChainEntryHeader;
418
+ interface ChainEntry {
419
+ hash: string;
420
+ height: number;
421
+ timestamp: number;
422
+ mutations_hash: string;
423
+ tx_count?: number;
424
+ mask?: string;
425
+ consensus?: {
426
+ score: number;
427
+ finality_reached: boolean;
428
+ mut_hash: string;
429
+ };
430
+ header_unpacked: ChainEntryHeader;
433
431
  }
434
432
  /**
435
433
  * Chain statistics
436
434
  */
437
- export interface ChainStats {
438
- height: number;
439
- total_entries: number;
440
- total_transactions: number;
441
- tip_hash?: string;
442
- tip?: ChainEntry;
443
- tx_pool_size?: number;
444
- cur_validator?: string;
445
- next_validator?: string;
446
- emission_for_epoch?: number;
447
- circulating?: number;
448
- total_supply_y3?: number;
449
- total_supply_y30?: number;
450
- pflops?: number;
435
+ interface ChainStats {
436
+ height: number;
437
+ total_entries: number;
438
+ total_transactions: number;
439
+ tip_hash?: string;
440
+ tip?: ChainEntry;
441
+ tx_pool_size?: number;
442
+ cur_validator?: string;
443
+ next_validator?: string;
444
+ emission_for_epoch?: number;
445
+ circulating?: number;
446
+ total_supply_y3?: number;
447
+ total_supply_y30?: number;
448
+ pflops?: number;
451
449
  }
452
450
  /**
453
451
  * Token balance structure
454
452
  */
455
- export interface TokenBalance {
456
- float: number;
457
- symbol: string;
458
- flat: number;
453
+ interface TokenBalance {
454
+ float: number;
455
+ symbol: string;
456
+ flat: number;
459
457
  }
460
458
  /**
461
459
  * Wallet balance wrapper
462
460
  */
463
- export interface WalletBalance {
464
- balance: {
465
- float: number;
466
- flat: number;
467
- symbol: string;
468
- };
461
+ interface WalletBalance {
462
+ balance: {
463
+ float: number;
464
+ flat: number;
465
+ symbol: string;
466
+ };
469
467
  }
470
468
  /**
471
469
  * Wallet balances map
472
470
  */
473
- export interface WalletBalances {
474
- [symbol: string]: {
475
- float: number;
476
- flat: number;
477
- symbol: string;
478
- };
471
+ interface WalletBalances {
472
+ [symbol: string]: {
473
+ float: number;
474
+ flat: number;
475
+ symbol: string;
476
+ };
479
477
  }
480
478
  /**
481
479
  * Contract data value can be any JSON-serializable value
482
480
  */
483
- export type ContractDataValue = string | number | boolean | null | ContractDataValue[] | {
484
- [key: string]: ContractDataValue;
481
+ type ContractDataValue = string | number | boolean | null | ContractDataValue[] | {
482
+ [key: string]: ContractDataValue;
485
483
  };
486
484
  /**
487
485
  * Contract data structure
488
486
  */
489
- export interface ContractData {
490
- contract: string;
491
- key: string;
492
- value: ContractDataValue;
487
+ interface ContractData {
488
+ contract: string;
489
+ key: string;
490
+ value: ContractDataValue;
493
491
  }
494
492
  /**
495
493
  * Richlist entry structure
496
494
  */
497
- export interface RichlistEntry {
498
- address: string;
499
- balance: string;
500
- symbol: string;
501
- rank: number;
495
+ interface RichlistEntry {
496
+ address: string;
497
+ balance: string;
498
+ symbol: string;
499
+ rank: number;
502
500
  }
503
501
  /**
504
502
  * Epoch score structure
505
503
  */
506
- export type EpochScoreAll = [string, number][];
507
- export type EpochScoreSingle = {
508
- error: 'ok';
509
- score: number;
504
+ type EpochScoreAll = [string, number][];
505
+ type EpochScoreSingle = {
506
+ error: 'ok';
507
+ score: number;
510
508
  };
511
- export type EpochScore = EpochScoreAll | EpochScoreSingle;
509
+ type EpochScore = EpochScoreAll | EpochScoreSingle;
512
510
  /**
513
511
  * Emission address structure
514
512
  */
515
- export interface EmissionAddress {
516
- address: string;
517
- pk: string;
513
+ interface EmissionAddress {
514
+ address: string;
515
+ pk: string;
518
516
  }
519
517
  /**
520
518
  * Peer information structure
521
519
  */
522
- export interface PeerInfo {
523
- pk: string;
524
- version: string;
525
- latency?: number;
526
- temporal_height?: number;
527
- temporal_hash?: string;
528
- rooted_height?: number;
529
- rooted_hash?: string;
530
- is_trainer?: boolean;
531
- slot_speed?: number;
532
- online?: boolean;
533
- in_slot?: boolean;
520
+ interface PeerInfo {
521
+ pk: string;
522
+ version: string;
523
+ latency?: number;
524
+ temporal_height?: number;
525
+ temporal_hash?: string;
526
+ rooted_height?: number;
527
+ rooted_hash?: string;
528
+ is_trainer?: boolean;
529
+ slot_speed?: number;
530
+ online?: boolean;
531
+ in_slot?: boolean;
534
532
  }
535
533
  /**
536
534
  * ANR (Autonomous Network Registry) information structure
537
535
  */
538
- export interface ANRInfo {
539
- pk: string;
540
- pop: string;
541
- signature: string;
542
- ip4: string;
543
- port: number;
544
- handshaked: boolean;
545
- isChainPop: boolean;
546
- version: string;
547
- ts: number;
536
+ interface ANRInfo {
537
+ pk: string;
538
+ pop: string;
539
+ signature: string;
540
+ ip4: string;
541
+ port: number;
542
+ handshaked: boolean;
543
+ isChainPop: boolean;
544
+ version: string;
545
+ ts: number;
548
546
  }
549
547
  /**
550
548
  * Validator proof node structure
551
549
  */
552
- export interface ValidatorProofNode {
553
- direction: string;
554
- hash: string;
550
+ interface ValidatorProofNode {
551
+ direction: string;
552
+ hash: string;
555
553
  }
556
554
  /**
557
555
  * Validator proof data structure
558
556
  */
559
- export interface ValidatorProofData {
560
- root: string;
561
- path: string;
562
- hash: string;
563
- nodes: ValidatorProofNode[];
557
+ interface ValidatorProofData {
558
+ root: string;
559
+ path: string;
560
+ hash: string;
561
+ nodes: ValidatorProofNode[];
564
562
  }
565
- export interface GetTipResponse {
566
- entry: ChainEntry;
563
+ interface GetTipResponse {
564
+ entry: ChainEntry;
567
565
  }
568
- export interface GetStatsResponse {
569
- stats: ChainStats;
566
+ interface GetStatsResponse {
567
+ stats: ChainStats;
570
568
  }
571
- export interface GetByHashResponse {
572
- entry: ChainEntry;
569
+ interface GetByHashResponse {
570
+ entry: ChainEntry;
573
571
  }
574
- export interface GetByHeightResponse {
575
- entries: ChainEntry[];
572
+ interface GetByHeightResponse {
573
+ entries: ChainEntry[];
576
574
  }
577
- export interface GetTransactionEventsByAccountResponse {
578
- cursor: string;
579
- txs: TransactionEvent[];
575
+ interface GetTransactionEventsByAccountResponse {
576
+ cursor: string;
577
+ txs: TransactionEvent[];
580
578
  }
581
- export interface GetTransactionsInEntryResponse {
582
- txs: Transaction[];
579
+ interface GetTransactionsInEntryResponse {
580
+ txs: Transaction[];
583
581
  }
584
582
  /**
585
583
  * Query parameters for getting token balance
586
584
  */
587
- export interface GetTokenBalanceQuery {
588
- address: string;
589
- symbol?: string;
585
+ interface GetTokenBalanceQuery {
586
+ address: string;
587
+ symbol?: string;
590
588
  }
591
589
  /**
592
590
  * Response for getting token balance
593
591
  */
594
- export interface GetTokenBalanceResponse {
595
- error: string;
596
- data: TokenBalance;
592
+ interface GetTokenBalanceResponse {
593
+ error: string;
594
+ data: TokenBalance;
597
595
  }
598
596
  /**
599
597
  * Query parameters for getting wallet transactions
600
598
  */
601
- export interface GetWalletTransactionsQuery {
602
- address: string;
603
- contract?: Contract;
604
- function?: ContractFunction;
605
- type?: TransactionEventType;
606
- sort?: 'asc' | 'desc';
607
- limit?: number;
608
- offset?: number;
609
- cursor?: string;
599
+ interface GetWalletTransactionsQuery {
600
+ address: string;
601
+ contract?: Contract;
602
+ function?: ContractFunction;
603
+ type?: TransactionEventType;
604
+ sort?: 'asc' | 'desc';
605
+ limit?: number;
606
+ offset?: number;
607
+ cursor?: string;
610
608
  }
611
609
  /**
612
610
  * Response for getting wallet transactions
613
611
  */
614
- export interface GetWalletTransactionsResponse {
615
- cursor: string;
616
- txs: Transaction[];
612
+ interface GetWalletTransactionsResponse {
613
+ cursor: string;
614
+ txs: Transaction[];
617
615
  }
618
- export interface GetAllBalancesResponse {
619
- error?: string;
620
- balances: TokenBalance[] | WalletBalances;
616
+ interface GetAllBalancesResponse {
617
+ error?: string;
618
+ balances: TokenBalance[] | WalletBalances;
621
619
  }
622
- export interface ValidateBytecodeResponse {
623
- error: string;
620
+ interface ValidateBytecodeResponse {
621
+ error: string;
624
622
  }
625
- export interface GetRichlistResponse {
626
- richlist: RichlistEntry[];
623
+ interface GetRichlistResponse {
624
+ richlist: RichlistEntry[];
627
625
  }
628
- export interface GetEmissionAddressResponse {
629
- error: 'ok';
630
- emission_address: string | null;
626
+ interface GetEmissionAddressResponse {
627
+ error: 'ok';
628
+ emission_address: string | null;
631
629
  }
632
630
  /**
633
631
  * Response for checking if solution is in epoch
634
632
  */
635
- export interface GetSolInEpochResponse {
636
- error: 'ok' | 'invalid_epoch' | 'sol_not_found';
633
+ interface GetSolInEpochResponse {
634
+ error: 'ok' | 'invalid_epoch' | 'sol_not_found';
637
635
  }
638
- export interface GetNodesResponse {
639
- nodes: PeerInfo[];
636
+ interface GetNodesResponse {
637
+ nodes: PeerInfo[];
640
638
  }
641
- export interface GetTrainersResponse {
642
- trainers: PeerInfo[];
639
+ interface GetTrainersResponse {
640
+ trainers: PeerInfo[];
643
641
  }
644
- export interface GetRemovedTrainersResponse {
645
- removed_trainers: PeerInfo[];
642
+ interface GetRemovedTrainersResponse {
643
+ removed_trainers: PeerInfo[];
646
644
  }
647
- export interface GetANRsResponse {
648
- anrs: ANRInfo[];
645
+ interface GetANRsResponse {
646
+ anrs: ANRInfo[];
649
647
  }
650
- export interface GetANRByPkResponse {
651
- anr: ANRInfo;
648
+ interface GetANRByPkResponse {
649
+ anr: ANRInfo;
652
650
  }
653
651
  /**
654
652
  * Query parameters for submitting a transaction
655
653
  */
656
- export interface SubmitTransactionRequestQuery {
657
- txPacked: Uint8Array;
654
+ interface SubmitTransactionRequestQuery {
655
+ txPacked: Uint8Array;
658
656
  }
659
- export interface SubmitTransactionResponse {
660
- error: TransactionValidationError | string;
661
- hash?: string;
657
+ interface SubmitTransactionResponse {
658
+ error: TransactionValidationError | string;
659
+ hash?: string;
662
660
  }
663
661
  /**
664
662
  * Response for submit and wait transaction
665
663
  */
666
- export interface SubmitAndWaitTransactionResponse {
667
- error: TransactionValidationError | string;
668
- hash?: string;
669
- metadata?: TransactionMetadata;
670
- receipt?: TransactionReceipt;
664
+ interface SubmitAndWaitTransactionResponse {
665
+ error: TransactionValidationError | string;
666
+ hash?: string;
667
+ metadata?: TransactionMetadata;
668
+ receipt?: TransactionReceipt;
671
669
  }
672
670
  /**
673
671
  * Validator proof response structure
674
672
  */
675
- export interface ProofValidators {
676
- key: string;
677
- value: string;
678
- validators: string[];
679
- proof: ValidatorProofData;
673
+ interface ProofValidators {
674
+ key: string;
675
+ value: string;
676
+ validators: string[];
677
+ proof: ValidatorProofData;
678
+ }
679
+ /**
680
+ * Contract state proof response structure (`/api/proof/contractstate`).
681
+ * `value` and `result` are present only when a value is supplied for verification.
682
+ */
683
+ interface ContractStateProof {
684
+ namespace: string;
685
+ key: string;
686
+ proof: ValidatorProofData;
687
+ value?: string;
688
+ result?: boolean;
689
+ }
690
+ /**
691
+ * Parameters for `/api/contract/view` (read-only on-chain function execution).
692
+ */
693
+ interface ContractViewParams {
694
+ /** Contract name (e.g. 'Coin', 'Lockup') or Base58-encoded contract address */
695
+ contract: string;
696
+ /** Function name to invoke */
697
+ function: string;
698
+ /** Function args (strings or raw bytes) */
699
+ args?: SerializableValue[];
700
+ /** Optional caller public key as 48-byte raw bytes; defaults to 48 zero bytes */
701
+ pk?: Uint8Array;
702
+ }
703
+ /**
704
+ * Response from `/api/contract/view`.
705
+ */
706
+ interface ContractViewResponse {
707
+ success: boolean;
708
+ result: string;
709
+ logs: string[];
710
+ }
711
+ /**
712
+ * Protocol-level KPIs returned by `/api/chain/kpi`.
713
+ */
714
+ interface ChainKpi {
715
+ ama_burned: number;
716
+ fees_paid: number;
717
+ active_validator_keys: number;
718
+ active_peers: number;
719
+ block_time: number;
720
+ total_tx: number;
721
+ uaw: number;
722
+ }
723
+ interface GetKpiResponse {
724
+ kpi: ChainKpi;
725
+ }
726
+ /**
727
+ * Filters accepted by `/api/chain/tx_by_filter`.
728
+ * All fields are optional. `signer`/`arg0`/`cursor` are Base58-encoded strings.
729
+ */
730
+ interface TxByFilterParams {
731
+ /** Base58 signer public key (also accepted as `sender` or `pk` aliases on the node) */
732
+ signer?: string;
733
+ /** Base58 first-arg value — typically the receiver address */
734
+ arg0?: string;
735
+ /** Contract name (ASCII) — for Base58-encoded contracts use `contract_b58` */
736
+ contract?: string;
737
+ /** Base58-encoded contract address (mutually exclusive with `contract`) */
738
+ contract_b58?: string;
739
+ /** Function name */
740
+ function?: string;
741
+ /** Page size (default 100, max 1000 enforced server-side) */
742
+ limit?: number;
743
+ /** Sort order (default 'asc') */
744
+ sort?: 'asc' | 'desc';
745
+ /** Base58-encoded cursor from a previous response */
746
+ cursor?: string;
747
+ }
748
+ interface TxByFilterResponse {
749
+ cursor: string | null;
750
+ txs: Transaction[];
751
+ }
752
+ /**
753
+ * Optional flags for `/api/tx/submit_and_wait`.
754
+ */
755
+ interface SubmitAndWaitOptions {
756
+ /** Wait until the transaction is finalized (consensus reached) instead of just confirmed */
757
+ finalized?: boolean;
680
758
  }
759
+ //#endregion
760
+ export { ANRInfo, AmadeusSDKConfig, AmadeusSDKError, ApiResponse, BuildTransactionResult, ChainEntry, ChainEntryHeader, ChainKpi, ChainStats, Contract, ContractData, ContractDataValue, ContractFunction, ContractStateProof, ContractViewParams, ContractViewResponse, DecodedValue, EmissionAddress, EpochScore, EpochScoreAll, EpochScoreSingle, GetANRByPkResponse, GetANRsResponse, GetAllBalancesResponse, GetByHashResponse, GetByHeightResponse, GetEmissionAddressResponse, GetKpiResponse, GetNodesResponse, GetRemovedTrainersResponse, GetRichlistResponse, GetSolInEpochResponse, GetStatsResponse, GetTipResponse, GetTokenBalanceQuery, GetTokenBalanceResponse, GetTrainersResponse, GetTransactionEventsByAccountResponse, GetTransactionsInEntryResponse, GetWalletTransactionsQuery, GetWalletTransactionsResponse, KeyPair, LockupPrimeDailyCheckinInput, LockupPrimeLockInput, LockupPrimeUnlockInput, LockupUnlockInput, PeerInfo, ProofValidators, RichlistEntry, SerializableValue, SubmitAndWaitOptions, SubmitAndWaitTransactionResponse, SubmitTransactionRequestQuery, SubmitTransactionResponse, TokenBalance, Transaction, TransactionAction, TransactionActionBody, TransactionActionResponse, TransactionBody, TransactionEvent, TransactionEventType, TransactionExecutionError, TransactionFilters, TransactionMetadata, TransactionPacked, TransactionReceipt, TransactionResult, TransactionUnpacked, TransactionValidationError, TransactionValidationResult, TransferTransactionInput, TxByFilterParams, TxByFilterResponse, UnsignedTransaction, UnsignedTransactionWithHash, ValidateBytecodeResponse, ValidatorProofData, ValidatorProofNode, WalletBalance, WalletBalances };
681
761
  //# sourceMappingURL=types.d.ts.map