ox 0.14.55 → 0.14.56
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/CHANGELOG.md +29 -0
- package/_cjs/tempo/{MultisigConfig.js → AccountConfig.js} +16 -4
- package/_cjs/tempo/AccountConfig.js.map +1 -0
- package/_cjs/tempo/{MultisigOperation.js → AccountOperation.js} +29 -29
- package/_cjs/tempo/AccountOperation.js.map +1 -0
- package/_cjs/tempo/{MultisigSimulation.js → AccountSimulation.js} +9 -9
- package/_cjs/tempo/AccountSimulation.js.map +1 -0
- package/_cjs/tempo/KeyAuthorization.js +12 -11
- package/_cjs/tempo/KeyAuthorization.js.map +1 -1
- package/_cjs/tempo/SignatureEnvelope.js +64 -64
- package/_cjs/tempo/SignatureEnvelope.js.map +1 -1
- package/_cjs/tempo/TransactionRequest.js +12 -9
- package/_cjs/tempo/TransactionRequest.js.map +1 -1
- package/_cjs/tempo/index.js +4 -4
- package/_cjs/tempo/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/tempo/{MultisigConfig.js → AccountConfig.js} +103 -55
- package/_esm/tempo/AccountConfig.js.map +1 -0
- package/_esm/tempo/{MultisigOperation.js → AccountOperation.js} +64 -64
- package/_esm/tempo/AccountOperation.js.map +1 -0
- package/_esm/tempo/{MultisigSimulation.js → AccountSimulation.js} +20 -20
- package/_esm/tempo/AccountSimulation.js.map +1 -0
- package/_esm/tempo/KeyAuthorization.js +13 -12
- package/_esm/tempo/KeyAuthorization.js.map +1 -1
- package/_esm/tempo/SignatureEnvelope.js +71 -71
- package/_esm/tempo/SignatureEnvelope.js.map +1 -1
- package/_esm/tempo/TransactionRequest.js +12 -9
- package/_esm/tempo/TransactionRequest.js.map +1 -1
- package/_esm/tempo/index.js +50 -48
- package/_esm/tempo/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/tempo/{MultisigConfig.d.ts → AccountConfig.d.ts} +110 -63
- package/_types/tempo/AccountConfig.d.ts.map +1 -0
- package/_types/tempo/{MultisigOperation.d.ts → AccountOperation.d.ts} +62 -62
- package/_types/tempo/AccountOperation.d.ts.map +1 -0
- package/_types/tempo/{MultisigSimulation.d.ts → AccountSimulation.d.ts} +21 -21
- package/_types/tempo/AccountSimulation.d.ts.map +1 -0
- package/_types/tempo/KeyAuthorization.d.ts +14 -14
- package/_types/tempo/KeyAuthorization.d.ts.map +1 -1
- package/_types/tempo/RpcSchemaTempo.d.ts +13 -13
- package/_types/tempo/RpcSchemaTempo.d.ts.map +1 -1
- package/_types/tempo/SignatureEnvelope.d.ts +36 -33
- package/_types/tempo/SignatureEnvelope.d.ts.map +1 -1
- package/_types/tempo/TransactionRequest.d.ts +11 -9
- package/_types/tempo/TransactionRequest.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +50 -48
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/package.json +31 -31
- package/tempo/AccountConfig/package.json +6 -0
- package/tempo/AccountConfig.test-d/package.json +6 -0
- package/tempo/{MultisigConfig.test-d.ts → AccountConfig.test-d.ts} +22 -12
- package/tempo/{MultisigConfig.test.ts → AccountConfig.test.ts} +155 -37
- package/tempo/{MultisigConfig.ts → AccountConfig.ts} +132 -66
- package/tempo/AccountOperation/package.json +6 -0
- package/tempo/AccountOperation.test-d/package.json +6 -0
- package/tempo/AccountOperation.test-d.ts +71 -0
- package/tempo/{MultisigOperation.test.ts → AccountOperation.test.ts} +97 -97
- package/tempo/{MultisigOperation.ts → AccountOperation.ts} +95 -97
- package/tempo/AccountSimulation/package.json +6 -0
- package/tempo/AccountSimulation.test-d/package.json +6 -0
- package/tempo/{MultisigSimulation.test-d.ts → AccountSimulation.test-d.ts} +7 -9
- package/tempo/{MultisigSimulation.test.ts → AccountSimulation.test.ts} +29 -29
- package/tempo/{MultisigSimulation.ts → AccountSimulation.ts} +28 -30
- package/tempo/KeyAuthorization.test-d.ts +14 -14
- package/tempo/KeyAuthorization.test.ts +70 -49
- package/tempo/KeyAuthorization.ts +29 -27
- package/tempo/RpcSchemaTempo.test-d.ts +19 -19
- package/tempo/RpcSchemaTempo.ts +13 -13
- package/tempo/SignatureEnvelope.test-d.ts +7 -7
- package/tempo/SignatureEnvelope.test.ts +34 -34
- package/tempo/SignatureEnvelope.ts +107 -103
- package/tempo/Transaction.test.ts +4 -4
- package/tempo/TransactionRequest.test-d.ts +16 -7
- package/tempo/TransactionRequest.test.ts +25 -17
- package/tempo/TransactionRequest.ts +25 -18
- package/tempo/{multisig.e2e.test.ts → configurableAccounts.e2e.test.ts} +16 -16
- package/tempo/index.ts +50 -48
- package/version.ts +1 -1
- package/_cjs/tempo/MultisigConfig.js.map +0 -1
- package/_cjs/tempo/MultisigOperation.js.map +0 -1
- package/_cjs/tempo/MultisigSimulation.js.map +0 -1
- package/_esm/tempo/MultisigConfig.js.map +0 -1
- package/_esm/tempo/MultisigOperation.js.map +0 -1
- package/_esm/tempo/MultisigSimulation.js.map +0 -1
- package/_types/tempo/MultisigConfig.d.ts.map +0 -1
- package/_types/tempo/MultisigOperation.d.ts.map +0 -1
- package/_types/tempo/MultisigSimulation.d.ts.map +0 -1
- package/tempo/MultisigConfig/package.json +0 -6
- package/tempo/MultisigConfig.test-d/package.json +0 -6
- package/tempo/MultisigOperation/package.json +0 -6
- package/tempo/MultisigOperation.test-d/package.json +0 -6
- package/tempo/MultisigOperation.test-d.ts +0 -71
- package/tempo/MultisigSimulation/package.json +0 -6
- package/tempo/MultisigSimulation.test-d/package.json +0 -6
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as Address from '../core/Address.js';
|
|
2
2
|
import * as Errors from '../core/Errors.js';
|
|
3
3
|
import * as Hex from '../core/Hex.js';
|
|
4
|
+
import * as AccountConfig from './AccountConfig.js';
|
|
4
5
|
import * as KeyAuthorization_ from './KeyAuthorization.js';
|
|
5
|
-
import * as MultisigConfig from './MultisigConfig.js';
|
|
6
6
|
import * as SignatureEnvelope from './SignatureEnvelope.js';
|
|
7
7
|
import * as TxEnvelopeTempo from './TxEnvelopeTempo.js';
|
|
8
|
-
/** Fields shared by every
|
|
8
|
+
/** Fields shared by every account operation. */
|
|
9
9
|
export type Base<quantity = bigint> = {
|
|
10
|
-
/** Root
|
|
10
|
+
/** Root configurable account. */
|
|
11
11
|
account: Address.Address;
|
|
12
12
|
/** Every retained serialized owner approval. */
|
|
13
13
|
approvals: readonly Hex.Hex[];
|
|
14
14
|
/** Root configuration used to verify approvals. */
|
|
15
|
-
config:
|
|
15
|
+
config: AccountConfig.Config<quantity>;
|
|
16
16
|
/** Unix creation time in milliseconds. */
|
|
17
17
|
createdAt: number;
|
|
18
|
-
/** Deterministic
|
|
18
|
+
/** Deterministic account operation hash. */
|
|
19
19
|
hash: Hex.Hex;
|
|
20
20
|
/** Number of approvals selected for quorum evaluation. */
|
|
21
21
|
signatureCount: number;
|
|
@@ -26,7 +26,7 @@ export type Base<quantity = bigint> = {
|
|
|
26
26
|
/** Root owner weight reached by the selected approvals. */
|
|
27
27
|
weight: number;
|
|
28
28
|
};
|
|
29
|
-
/**
|
|
29
|
+
/** Account transaction approval operation. */
|
|
30
30
|
export type TransactionOperation<quantity = bigint> = Base<quantity> & {
|
|
31
31
|
/** Time when another relay may reclaim the submission lease. */
|
|
32
32
|
expiresAt?: number | undefined;
|
|
@@ -41,7 +41,7 @@ export type TransactionOperation<quantity = bigint> = Base<quantity> & {
|
|
|
41
41
|
/** Operation kind. */
|
|
42
42
|
type: 'transaction';
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
44
|
+
/** Account key authorization approval operation. */
|
|
45
45
|
export type KeyAuthorizationOperation<quantity = bigint> = Base<quantity> & {
|
|
46
46
|
/** Canonical serialized key authorization. */
|
|
47
47
|
keyAuthorization: Hex.Hex;
|
|
@@ -50,23 +50,23 @@ export type KeyAuthorizationOperation<quantity = bigint> = Base<quantity> & {
|
|
|
50
50
|
/** Operation kind. */
|
|
51
51
|
type: 'keyAuthorization';
|
|
52
52
|
};
|
|
53
|
-
/** Transaction or key authorization
|
|
53
|
+
/** Transaction or key authorization account operation. */
|
|
54
54
|
export type Operation<quantity = bigint> = TransactionOperation<quantity> | KeyAuthorizationOperation<quantity>;
|
|
55
|
-
/** JSON-RPC
|
|
55
|
+
/** JSON-RPC account transaction operation. */
|
|
56
56
|
export type TransactionRpc = TransactionOperation<Hex.Hex>;
|
|
57
|
-
/** JSON-RPC
|
|
57
|
+
/** JSON-RPC account key authorization operation. */
|
|
58
58
|
export type KeyAuthorizationRpc = KeyAuthorizationOperation<Hex.Hex>;
|
|
59
|
-
/** JSON-RPC
|
|
59
|
+
/** JSON-RPC account operation. */
|
|
60
60
|
export type Rpc = Operation<Hex.Hex>;
|
|
61
61
|
/**
|
|
62
|
-
* Derives the deterministic hash for
|
|
62
|
+
* Derives the deterministic hash for an account operation.
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* ```ts twoslash
|
|
66
66
|
* // @noErrors
|
|
67
|
-
* import {
|
|
67
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
68
68
|
*
|
|
69
|
-
* const hash =
|
|
69
|
+
* const hash = AccountOperation.getHash({
|
|
70
70
|
* account,
|
|
71
71
|
* config,
|
|
72
72
|
* transaction,
|
|
@@ -74,17 +74,17 @@ export type Rpc = Operation<Hex.Hex>;
|
|
|
74
74
|
* })
|
|
75
75
|
* ```
|
|
76
76
|
*
|
|
77
|
-
* @param options - Operation payload and
|
|
77
|
+
* @param options - Operation payload and account identity.
|
|
78
78
|
* @returns The operation hash signed by each owner.
|
|
79
79
|
*/
|
|
80
80
|
export declare function getHash(options: getHash.Options): Hex.Hex;
|
|
81
81
|
export declare namespace getHash {
|
|
82
82
|
/** Parameters for `getHash`. */
|
|
83
83
|
type Options = {
|
|
84
|
-
/** Root
|
|
84
|
+
/** Root configurable account. */
|
|
85
85
|
account: Address.Address;
|
|
86
|
-
/** Complete root
|
|
87
|
-
config:
|
|
86
|
+
/** Complete root account configuration witness. */
|
|
87
|
+
config: AccountConfig.Config;
|
|
88
88
|
} & ({
|
|
89
89
|
/** Canonical serialized key authorization. */
|
|
90
90
|
keyAuthorization: Hex.Hex;
|
|
@@ -97,7 +97,7 @@ export declare namespace getHash {
|
|
|
97
97
|
type: 'transaction';
|
|
98
98
|
});
|
|
99
99
|
/** Error type for `getHash`. */
|
|
100
|
-
type ErrorType = KeyAuthorization_.deserialize.ErrorType | KeyAuthorization_.getSignPayload.ErrorType |
|
|
100
|
+
type ErrorType = KeyAuthorization_.deserialize.ErrorType | KeyAuthorization_.getSignPayload.ErrorType | AccountConfig.getSignPayload.ErrorType | TxEnvelopeTempo.deserialize.ErrorType | TxEnvelopeTempo.getSignPayload.ErrorType | Errors.GlobalErrorType;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Validates, deduplicates, and selects owner approvals for an operation.
|
|
@@ -110,9 +110,9 @@ export declare namespace getHash {
|
|
|
110
110
|
* @example
|
|
111
111
|
* ```ts twoslash
|
|
112
112
|
* // @noErrors
|
|
113
|
-
* import {
|
|
113
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
114
114
|
*
|
|
115
|
-
* const selection = await
|
|
115
|
+
* const selection = await AccountOperation.selectApprovals({
|
|
116
116
|
* account,
|
|
117
117
|
* approvals,
|
|
118
118
|
* config,
|
|
@@ -127,12 +127,12 @@ export declare function selectApprovals(options: selectApprovals.Options): Promi
|
|
|
127
127
|
export declare namespace selectApprovals {
|
|
128
128
|
/** Parameters for `selectApprovals`. */
|
|
129
129
|
type Options = {
|
|
130
|
-
/** Root
|
|
130
|
+
/** Root configurable account. */
|
|
131
131
|
account: Address.Address;
|
|
132
132
|
/** Serialized primitive owner approvals. */
|
|
133
133
|
approvals: readonly SignatureEnvelope.Serialized[];
|
|
134
|
-
/** Current root
|
|
135
|
-
config:
|
|
134
|
+
/** Current root account configuration. */
|
|
135
|
+
config: AccountConfig.Config;
|
|
136
136
|
/** Deterministic operation hash approved by root owners. */
|
|
137
137
|
hash: Hex.Hex;
|
|
138
138
|
};
|
|
@@ -150,17 +150,17 @@ export declare namespace selectApprovals {
|
|
|
150
150
|
weight: number;
|
|
151
151
|
};
|
|
152
152
|
/** Error type for `selectApprovals`. */
|
|
153
|
-
type ErrorType = InvalidApprovalError |
|
|
153
|
+
type ErrorType = InvalidApprovalError | AccountConfig.assert.ErrorType | AccountConfig.getSignPayload.ErrorType | SignatureEnvelope.CoercionError | SignatureEnvelope.extractAddress.ErrorType | SignatureEnvelope.serialize.ErrorType | SignatureEnvelope.VerificationError | Errors.GlobalErrorType;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Serializes a key authorization with selected
|
|
156
|
+
* Serializes a key authorization with selected owner approvals.
|
|
157
157
|
*
|
|
158
158
|
* @example
|
|
159
159
|
* ```ts twoslash
|
|
160
160
|
* // @noErrors
|
|
161
|
-
* import {
|
|
161
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
162
162
|
*
|
|
163
|
-
* const authorization =
|
|
163
|
+
* const authorization = AccountOperation.serializeKeyAuthorization(
|
|
164
164
|
* keyAuthorization,
|
|
165
165
|
* {
|
|
166
166
|
* account,
|
|
@@ -171,37 +171,37 @@ export declare namespace selectApprovals {
|
|
|
171
171
|
* ```
|
|
172
172
|
*
|
|
173
173
|
* @param keyAuthorization - Canonical serialized unsigned key authorization.
|
|
174
|
-
* @param options -
|
|
174
|
+
* @param options - Configurable account, config, and selected approvals.
|
|
175
175
|
* @returns The signed serialized key authorization.
|
|
176
176
|
*/
|
|
177
177
|
export declare function serializeKeyAuthorization(keyAuthorization: Hex.Hex, options: serializeKeyAuthorization.Options): Hex.Hex;
|
|
178
178
|
export declare namespace serializeKeyAuthorization {
|
|
179
179
|
/** Options for `serializeKeyAuthorization`. */
|
|
180
180
|
type Options = {
|
|
181
|
-
/** Root
|
|
181
|
+
/** Root configurable account. */
|
|
182
182
|
account: Address.Address;
|
|
183
183
|
/** Selected serialized owner approvals. */
|
|
184
184
|
approvals: readonly SignatureEnvelope.Serialized[];
|
|
185
|
-
/** Complete applicable root
|
|
186
|
-
config:
|
|
185
|
+
/** Complete applicable root account config. */
|
|
186
|
+
config: AccountConfig.Config;
|
|
187
187
|
};
|
|
188
188
|
/** Error type for `serializeKeyAuthorization`. */
|
|
189
|
-
type ErrorType = InvalidOperationError | KeyAuthorization_.deserialize.ErrorType | KeyAuthorization_.from.ErrorType | KeyAuthorization_.getSignPayload.ErrorType | KeyAuthorization_.serialize.ErrorType |
|
|
189
|
+
type ErrorType = InvalidOperationError | KeyAuthorization_.deserialize.ErrorType | KeyAuthorization_.from.ErrorType | KeyAuthorization_.getSignPayload.ErrorType | KeyAuthorization_.serialize.ErrorType | AccountConfig.assert.ErrorType | SignatureEnvelope.assert.ErrorType | SignatureEnvelope.InvalidSerializedError | SignatureEnvelope.sortApprovals.ErrorType | Errors.GlobalErrorType;
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* Serializes
|
|
192
|
+
* Serializes an account transaction operation with selected owner approvals.
|
|
193
193
|
*
|
|
194
194
|
* @example
|
|
195
195
|
* ```ts twoslash
|
|
196
196
|
* // @noErrors
|
|
197
|
-
* import {
|
|
197
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
198
198
|
*
|
|
199
|
-
* const transaction =
|
|
199
|
+
* const transaction = AccountOperation.serializeTransaction(operation, {
|
|
200
200
|
* approvals: selection.selectedApprovals,
|
|
201
201
|
* })
|
|
202
202
|
* ```
|
|
203
203
|
*
|
|
204
|
-
* @param operation -
|
|
204
|
+
* @param operation - Account transaction operation.
|
|
205
205
|
* @param options - Transaction serialization options.
|
|
206
206
|
* @returns The signed serialized Tempo transaction.
|
|
207
207
|
*/
|
|
@@ -213,20 +213,20 @@ export declare namespace serializeTransaction {
|
|
|
213
213
|
approvals: readonly SignatureEnvelope.Serialized[];
|
|
214
214
|
};
|
|
215
215
|
/** Error type for `serializeTransaction`. */
|
|
216
|
-
type ErrorType = from.ErrorType | InvalidOperationError | SignatureEnvelope.
|
|
216
|
+
type ErrorType = from.ErrorType | InvalidOperationError | SignatureEnvelope.sortApprovals.ErrorType | TxEnvelopeTempo.deserialize.ErrorType | TxEnvelopeTempo.getSignPayload.ErrorType | TxEnvelopeTempo.serialize.ErrorType | Errors.GlobalErrorType;
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
* Validates and normalizes
|
|
219
|
+
* Validates and normalizes an account operation.
|
|
220
220
|
*
|
|
221
221
|
* @example
|
|
222
222
|
* ```ts twoslash
|
|
223
223
|
* // @noErrors
|
|
224
|
-
* import {
|
|
224
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
225
225
|
*
|
|
226
|
-
* const operation =
|
|
226
|
+
* const operation = AccountOperation.from(value)
|
|
227
227
|
* ```
|
|
228
228
|
*
|
|
229
|
-
* @param operation -
|
|
229
|
+
* @param operation - Account operation.
|
|
230
230
|
* @returns The validated operation.
|
|
231
231
|
*/
|
|
232
232
|
export declare function from<const operation extends Operation>(operation: operation): from.ReturnValue<operation>;
|
|
@@ -237,17 +237,17 @@ export declare namespace from {
|
|
|
237
237
|
type ErrorType = InvalidOperationError | Errors.GlobalErrorType;
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Converts a JSON-RPC
|
|
240
|
+
* Converts a JSON-RPC account operation to its domain representation.
|
|
241
241
|
*
|
|
242
242
|
* @example
|
|
243
243
|
* ```ts twoslash
|
|
244
244
|
* // @noErrors
|
|
245
|
-
* import {
|
|
245
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
246
246
|
*
|
|
247
|
-
* const operation =
|
|
247
|
+
* const operation = AccountOperation.fromRpc(value)
|
|
248
248
|
* ```
|
|
249
249
|
*
|
|
250
|
-
* @param operation - JSON-RPC
|
|
250
|
+
* @param operation - JSON-RPC account operation.
|
|
251
251
|
* @returns The validated operation.
|
|
252
252
|
*/
|
|
253
253
|
export declare function fromRpc<const operation extends Rpc>(operation: operation): fromRpc.ReturnValue<operation>;
|
|
@@ -258,17 +258,17 @@ export declare namespace fromRpc {
|
|
|
258
258
|
type ErrorType = InvalidOperationError | Errors.GlobalErrorType;
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
|
-
* Converts
|
|
261
|
+
* Converts an account operation to its JSON-RPC representation.
|
|
262
262
|
*
|
|
263
263
|
* @example
|
|
264
264
|
* ```ts twoslash
|
|
265
265
|
* // @noErrors
|
|
266
|
-
* import {
|
|
266
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
267
267
|
*
|
|
268
|
-
* const operationRpc =
|
|
268
|
+
* const operationRpc = AccountOperation.toRpc(operation)
|
|
269
269
|
* ```
|
|
270
270
|
*
|
|
271
|
-
* @param operation -
|
|
271
|
+
* @param operation - Account operation.
|
|
272
272
|
* @returns The JSON-RPC operation.
|
|
273
273
|
*/
|
|
274
274
|
export declare function toRpc<const operation extends Operation>(operation: operation): toRpc.ReturnValue<operation>;
|
|
@@ -276,19 +276,19 @@ export declare namespace toRpc {
|
|
|
276
276
|
/** Return type for `toRpc`. */
|
|
277
277
|
type ReturnValue<operation extends Operation> = operation extends TransactionOperation ? TransactionRpc : KeyAuthorizationRpc;
|
|
278
278
|
/** Error type for `toRpc`. */
|
|
279
|
-
type ErrorType = from.ErrorType |
|
|
279
|
+
type ErrorType = from.ErrorType | AccountConfig.toRpc.ErrorType;
|
|
280
280
|
}
|
|
281
|
-
/** Thrown when
|
|
281
|
+
/** Thrown when an account operation owner approval is invalid. */
|
|
282
282
|
export declare class InvalidApprovalError extends Errors.BaseError<Error | undefined> {
|
|
283
|
-
readonly name = "
|
|
283
|
+
readonly name = "AccountOperation.InvalidApprovalError";
|
|
284
284
|
/**
|
|
285
|
-
* Creates an invalid
|
|
285
|
+
* Creates an invalid operation approval error.
|
|
286
286
|
*
|
|
287
287
|
* @example
|
|
288
288
|
* ```ts twoslash
|
|
289
|
-
* import {
|
|
289
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
290
290
|
*
|
|
291
|
-
* throw new
|
|
291
|
+
* throw new AccountOperation.InvalidApprovalError({
|
|
292
292
|
* reason: 'signature is from a non-owner',
|
|
293
293
|
* })
|
|
294
294
|
* ```
|
|
@@ -306,17 +306,17 @@ export declare namespace InvalidApprovalError {
|
|
|
306
306
|
reason?: string | undefined;
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
/** Thrown when
|
|
309
|
+
/** Thrown when an account operation is malformed or internally inconsistent. */
|
|
310
310
|
export declare class InvalidOperationError extends Errors.BaseError<Error | undefined> {
|
|
311
|
-
readonly name = "
|
|
311
|
+
readonly name = "AccountOperation.InvalidOperationError";
|
|
312
312
|
/**
|
|
313
|
-
* Creates an invalid
|
|
313
|
+
* Creates an invalid account operation error.
|
|
314
314
|
*
|
|
315
315
|
* @example
|
|
316
316
|
* ```ts twoslash
|
|
317
|
-
* import {
|
|
317
|
+
* import { AccountOperation } from 'ox/tempo'
|
|
318
318
|
*
|
|
319
|
-
* throw new
|
|
319
|
+
* throw new AccountOperation.InvalidOperationError({
|
|
320
320
|
* reason: 'hash does not match the operation payload',
|
|
321
321
|
* })
|
|
322
322
|
* ```
|
|
@@ -334,4 +334,4 @@ export declare namespace InvalidOperationError {
|
|
|
334
334
|
reason?: string | undefined;
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
//# sourceMappingURL=
|
|
337
|
+
//# sourceMappingURL=AccountOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountOperation.d.ts","sourceRoot":"","sources":["../../tempo/AccountOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,eAA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SAAS,IACjD,SAAS,SAAS,oBAAoB,GAClC,cAAc,GACd,mBAAmB,CAAA;IAEzB,8BAA8B;IAC9B,KAAY,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,SAAS,CAAA;CACvE;AAilBD,kEAAkE;AAClE,qBAAa,oBAAqB,SAAQ,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC;IAC3E,SAAkB,IAAI,2CAA0C;IAEhE;;;;;;;;;;;;;OAaG;gBACS,OAAO,GAAE,oBAAoB,CAAC,OAAY;CAQvD;AAED,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,kCAAkC;IAClC,KAAY,OAAO,GAAG;QACpB,wBAAwB;QACxB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QAC3B,0BAA0B;QAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC5B,CAAA;CACF;AAED,gFAAgF;AAChF,qBAAa,qBAAsB,SAAQ,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC;IAC5E,SAAkB,IAAI,4CAA2C;IAEjE;;;;;;;;;;;;;OAaG;gBACS,OAAO,GAAE,qBAAqB,CAAC,OAAY;CAQxD;AAED,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,kCAAkC;IAClC,KAAY,OAAO,GAAG;QACpB,wBAAwB;QACxB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QAC3B,0BAA0B;QAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC5B,CAAA;CACF"}
|
|
@@ -3,11 +3,11 @@ import * as Errors from '../core/Errors.js';
|
|
|
3
3
|
import * as Hex from '../core/Hex.js';
|
|
4
4
|
import type { Compute } from '../core/internal/types.js';
|
|
5
5
|
import * as Rlp from '../core/Rlp.js';
|
|
6
|
-
import * as
|
|
6
|
+
import * as AccountConfig from './AccountConfig.js';
|
|
7
7
|
import type * as SignatureEnvelope from './SignatureEnvelope.js';
|
|
8
|
-
/**
|
|
8
|
+
/** Configurable account owner approval used for RPC simulation. */
|
|
9
9
|
export type Approval = PrimitiveApproval;
|
|
10
|
-
/** JSON-RPC
|
|
10
|
+
/** JSON-RPC configurable account owner approval used for RPC simulation. */
|
|
11
11
|
export type ApprovalRpc = PrimitiveApproval;
|
|
12
12
|
/** Primitive owner approval used for RPC simulation. */
|
|
13
13
|
export type PrimitiveApproval = {
|
|
@@ -18,61 +18,61 @@ export type PrimitiveApproval = {
|
|
|
18
18
|
/** Configured owner address. */
|
|
19
19
|
owner: Address.Address;
|
|
20
20
|
};
|
|
21
|
-
/** JSON-RPC representation of
|
|
21
|
+
/** JSON-RPC representation of an account simulation spec. */
|
|
22
22
|
export type Rpc = Compute<{
|
|
23
23
|
/** Owner approvals to model. */
|
|
24
24
|
approvals: readonly ApprovalRpc[];
|
|
25
25
|
/** Canonical RLP-encoded applicable configuration. */
|
|
26
26
|
config: Hex.Hex;
|
|
27
27
|
}>;
|
|
28
|
-
/**
|
|
28
|
+
/** Account simulation spec used to construct an RPC simulation signature. */
|
|
29
29
|
export type Spec = Compute<{
|
|
30
30
|
/** Owner approvals to model. */
|
|
31
31
|
approvals: readonly Approval[];
|
|
32
32
|
/** Complete applicable configuration. */
|
|
33
|
-
config:
|
|
33
|
+
config: AccountConfig.Config;
|
|
34
34
|
}>;
|
|
35
35
|
/**
|
|
36
|
-
* Converts a JSON-RPC
|
|
36
|
+
* Converts a JSON-RPC account simulation spec to its domain representation.
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts twoslash
|
|
40
40
|
* // @noErrors
|
|
41
|
-
* import {
|
|
41
|
+
* import { AccountSimulation } from 'ox/tempo'
|
|
42
42
|
*
|
|
43
|
-
* const spec =
|
|
43
|
+
* const spec = AccountSimulation.fromRpc(specRpc)
|
|
44
44
|
* ```
|
|
45
45
|
*
|
|
46
|
-
* @param spec - JSON-RPC
|
|
47
|
-
* @returns The
|
|
46
|
+
* @param spec - JSON-RPC account simulation spec.
|
|
47
|
+
* @returns The account simulation spec with decoded configurations.
|
|
48
48
|
*/
|
|
49
49
|
export declare function fromRpc(spec: Rpc): Spec;
|
|
50
50
|
export declare namespace fromRpc {
|
|
51
51
|
/** Error type for `fromRpc`. */
|
|
52
|
-
type ErrorType = Hex.isEqual.ErrorType | InvalidSimulationError |
|
|
52
|
+
type ErrorType = Hex.isEqual.ErrorType | InvalidSimulationError | AccountConfig.assert.ErrorType | Rlp.fromHex.ErrorType | Rlp.toHex.ErrorType | Errors.GlobalErrorType;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* Converts
|
|
55
|
+
* Converts an account simulation spec to its JSON-RPC representation.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
58
|
* ```ts twoslash
|
|
59
59
|
* // @noErrors
|
|
60
|
-
* import {
|
|
60
|
+
* import { AccountSimulation } from 'ox/tempo'
|
|
61
61
|
*
|
|
62
|
-
* const specRpc =
|
|
62
|
+
* const specRpc = AccountSimulation.toRpc(spec)
|
|
63
63
|
* ```
|
|
64
64
|
*
|
|
65
|
-
* @param spec -
|
|
66
|
-
* @returns The JSON-RPC
|
|
65
|
+
* @param spec - Account simulation spec.
|
|
66
|
+
* @returns The JSON-RPC account simulation spec with encoded configurations.
|
|
67
67
|
*/
|
|
68
68
|
export declare function toRpc(spec: Spec): Rpc;
|
|
69
69
|
export declare namespace toRpc {
|
|
70
70
|
/** Error type for `toRpc`. */
|
|
71
|
-
type ErrorType = Hex.fromNumber.ErrorType | InvalidSimulationError |
|
|
71
|
+
type ErrorType = Hex.fromNumber.ErrorType | InvalidSimulationError | AccountConfig.assert.ErrorType | Rlp.fromHex.ErrorType | Errors.GlobalErrorType;
|
|
72
72
|
}
|
|
73
|
-
/** Thrown when
|
|
73
|
+
/** Thrown when an account simulation spec is invalid. */
|
|
74
74
|
export declare class InvalidSimulationError extends Errors.BaseError {
|
|
75
|
-
readonly name = "
|
|
75
|
+
readonly name = "AccountSimulation.InvalidSimulationError";
|
|
76
76
|
constructor(options: InvalidSimulationError.Options);
|
|
77
77
|
}
|
|
78
78
|
export declare namespace InvalidSimulationError {
|
|
@@ -82,4 +82,4 @@ export declare namespace InvalidSimulationError {
|
|
|
82
82
|
reason: string;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
//# sourceMappingURL=
|
|
85
|
+
//# sourceMappingURL=AccountSimulation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSimulation.d.ts","sourceRoot":"","sources":["../../tempo/AccountSimulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAEhE,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG,iBAAiB,CAAA;AAExC,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAA;AAE3C,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,SAAS,CAAA;IAC7B,gFAAgF;IAChF,OAAO,CAAC,EAAE,iBAAiB,CAAC,IAAI,GAAG,SAAS,CAAA;IAC5C,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAA;CACvB,CAAA;AAED,6DAA6D;AAC7D,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC;IACxB,gCAAgC;IAChC,SAAS,EAAE,SAAS,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AAA;KACf,CAAA;CACF"}
|
|
@@ -23,7 +23,7 @@ import * as TempoAddress from './TempoAddress.js';
|
|
|
23
23
|
* - `chainId`: Chain ID for replay protection (0 = valid on any chain)
|
|
24
24
|
* - `expiry`: Unix timestamp when the key expires (undefined = never expires)
|
|
25
25
|
* - `limits`: Per-TIP-20 token spending limits (only applies to `transfer()` and `approve()` calls)
|
|
26
|
-
* - `type`: Key type (`secp256k1`, `p256`, `webAuthn`, or `
|
|
26
|
+
* - `type`: Key type (`secp256k1`, `p256`, `webAuthn`, or `configurable`)
|
|
27
27
|
*
|
|
28
28
|
* [Access Keys Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#access-keys)
|
|
29
29
|
*/
|
|
@@ -68,19 +68,19 @@ export type KeyAuthorization<signed extends boolean = boolean, bigintType = bigi
|
|
|
68
68
|
/** Primitive key type. */
|
|
69
69
|
type: SignatureEnvelope.Type;
|
|
70
70
|
} | {
|
|
71
|
-
/** Required parent account binding for a
|
|
71
|
+
/** Required parent account binding for a configurable account grant. */
|
|
72
72
|
account: addressType;
|
|
73
|
-
/**
|
|
74
|
-
type: '
|
|
73
|
+
/** Configurable account key type. */
|
|
74
|
+
type: 'configurable';
|
|
75
75
|
}) & (signed extends true ? {
|
|
76
|
-
signature: SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.
|
|
76
|
+
signature: SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.Configurable<bigintType, numberType>;
|
|
77
77
|
} : {
|
|
78
|
-
signature?: SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.
|
|
78
|
+
signature?: SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.Configurable<bigintType, numberType> | undefined;
|
|
79
79
|
});
|
|
80
80
|
/** Signature that can authorize an access key. */
|
|
81
|
-
export type Signature<bigintType = bigint, numberType = number> = SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.
|
|
81
|
+
export type Signature<bigintType = bigint, numberType = number> = SignatureEnvelope.Primitive<bigintType, numberType> | SignatureEnvelope.Configurable<bigintType, numberType>;
|
|
82
82
|
/** RPC-formatted signature that can authorize an access key. */
|
|
83
|
-
export type SignatureRpc = SignatureEnvelope.
|
|
83
|
+
export type SignatureRpc = SignatureEnvelope.ConfigurableRpc | SignatureEnvelope.PrimitiveRpc;
|
|
84
84
|
/** Input type for a Key Authorization. */
|
|
85
85
|
export type Input = KeyAuthorization<false, bigint, number, TempoAddress.Address>;
|
|
86
86
|
/** RPC representation matching the node's wire format. */
|
|
@@ -107,9 +107,9 @@ export type Rpc = {
|
|
|
107
107
|
/** Primitive key type. */
|
|
108
108
|
keyType: SignatureEnvelope.Type;
|
|
109
109
|
} | {
|
|
110
|
-
/** Required parent account binding for a
|
|
110
|
+
/** Required parent account binding for a configurable account grant. */
|
|
111
111
|
account: Address.Address;
|
|
112
|
-
/**
|
|
112
|
+
/** Configurable account key type, named `multisig` by the node. */
|
|
113
113
|
keyType: 'multisig';
|
|
114
114
|
});
|
|
115
115
|
/** RPC representation of a token limit (matches node's `TokenLimit` serde). */
|
|
@@ -130,7 +130,7 @@ export type RpcSelectorRule = {
|
|
|
130
130
|
};
|
|
131
131
|
/** Signed representation of a Key Authorization. */
|
|
132
132
|
export type Signed<bigintType = bigint, numberType = number, addressType = Address.Address> = KeyAuthorization<true, bigintType, numberType, addressType>;
|
|
133
|
-
type SignatureValue = SignatureEnvelope.from.
|
|
133
|
+
type SignatureValue = SignatureEnvelope.from.ConfigurableFromConfig | UnionPartialBy<SignatureEnvelope.Primitive, 'prehash' | 'type'> | PartialBy<SignatureEnvelope.Configurable, 'type'> | SignatureEnvelope.Secp256k1Flat | SignatureEnvelope.Serialized;
|
|
134
134
|
type BaseTuple = readonly [
|
|
135
135
|
chainId: Hex.Hex,
|
|
136
136
|
keyType: Hex.Hex,
|
|
@@ -364,8 +364,8 @@ export type TokenLimit<bigintType = bigint, numberType = number, addressType = A
|
|
|
364
364
|
export declare function from<const authorization extends Input | Rpc, const signature extends SignatureValue | undefined = undefined>(authorization: authorization | KeyAuthorization, options?: from.Options<signature>): from.ReturnType<authorization, signature>;
|
|
365
365
|
export declare namespace from {
|
|
366
366
|
type Options<signature extends SignatureValue | undefined = SignatureValue | undefined> = {
|
|
367
|
-
/** The primitive or
|
|
368
|
-
signature?: signature | SignatureEnvelope.Primitive | SignatureEnvelope.
|
|
367
|
+
/** The primitive or configurable account signature to attach to the Key Authorization. */
|
|
368
|
+
signature?: signature | SignatureEnvelope.Primitive | SignatureEnvelope.Configurable | undefined;
|
|
369
369
|
};
|
|
370
370
|
type ReturnType<authorization extends KeyAuthorization | Input | Rpc = KeyAuthorization, signature extends SignatureValue | undefined = SignatureValue | undefined> = Compute<authorization extends Rpc ? Signed : TempoAddress.ResolveAddresses<authorization & (signature extends SignatureValue ? {
|
|
371
371
|
signature: Extract<SignatureEnvelope.from.ReturnValue<signature>, Signature>;
|
|
@@ -657,7 +657,7 @@ export declare class InvalidSignatureTypeError extends Error {
|
|
|
657
657
|
readonly name = "KeyAuthorization.InvalidSignatureTypeError";
|
|
658
658
|
constructor(type: SignatureEnvelope.SignatureEnvelope['type']);
|
|
659
659
|
}
|
|
660
|
-
/** Thrown when a
|
|
660
|
+
/** Thrown when a configurable account key grant omits its parent account binding. */
|
|
661
661
|
export declare class MissingAccountError extends Error {
|
|
662
662
|
readonly name = "KeyAuthorization.MissingAccountError";
|
|
663
663
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyAuthorization.d.ts","sourceRoot":"","sources":["../../tempo/KeyAuthorization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EACV,OAAO,EACP,SAAS,E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a,CAAC,CAwGnC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,KAAK,UAAU,CAAC,aAAa,SAAS,gBAAgB,GAAG,gBAAgB,IACvE,OAAO,CAAC,KAAK,CAAC,aAAa,SAAS,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAA;IAE7E,KAAK,SAAS,GACV,yBAAyB,GACzB,mBAAmB,GACnB,MAAM,CAAC,eAAe,CAAA;CAC3B;AAwDD,6DAA6D;AAC7D,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAkB,IAAI,8CAA6C;gBACvD,OAAO,EAAE,GAAG,CAAC,GAAG;CAK7B;AAED,2EAA2E;AAC3E,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAkB,IAAI,8CAA6C;gBACvD,MAAM,EAAE,GAAG,CAAC,GAAG;CAK5B;AAED,qEAAqE;AACrE,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,SAAkB,IAAI,gDAA+C;gBACzD,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC;CAK9D;AAED,qFAAqF;AACrF,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,SAAkB,IAAI,0CAAyC;;CAIhE"}
|
|
@@ -5,9 +5,9 @@ import type * as Hex from '../core/Hex.js';
|
|
|
5
5
|
import type * as Log from '../core/Log.js';
|
|
6
6
|
import type * as RpcSchema from '../core/RpcSchema.js';
|
|
7
7
|
import type * as StateOverrides from '../core/StateOverrides.js';
|
|
8
|
+
import type * as AccountConfig from './AccountConfig.js';
|
|
9
|
+
import type * as AccountOperation from './AccountOperation.js';
|
|
8
10
|
import type * as KeyAuthorization from './KeyAuthorization.js';
|
|
9
|
-
import type * as MultisigConfig from './MultisigConfig.js';
|
|
10
|
-
import type * as MultisigOperation from './MultisigOperation.js';
|
|
11
11
|
import type * as TransactionRequest from './TransactionRequest.js';
|
|
12
12
|
/**
|
|
13
13
|
* Union of all JSON-RPC Methods for the `tempo_` namespace.
|
|
@@ -52,22 +52,22 @@ export type Tempo = RpcSchema.From<{
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
}>;
|
|
55
|
-
/** Union of all JSON-RPC methods for the `
|
|
56
|
-
export type
|
|
55
|
+
/** Union of all JSON-RPC methods for the `account_` namespace. */
|
|
56
|
+
export type Account = RpcSchema.From<{
|
|
57
57
|
Request: {
|
|
58
|
-
method: '
|
|
58
|
+
method: 'account_approveRawTransaction';
|
|
59
59
|
params: [serializedTransaction: Hex.Hex];
|
|
60
60
|
};
|
|
61
61
|
ReturnType: Hex.Hex;
|
|
62
62
|
} | {
|
|
63
63
|
Request: {
|
|
64
|
-
method: '
|
|
64
|
+
method: 'account_approveRawTransactionSync';
|
|
65
65
|
params: [serializedTransaction: Hex.Hex, timeout?: number];
|
|
66
66
|
};
|
|
67
|
-
ReturnType:
|
|
67
|
+
ReturnType: AccountOperation.TransactionRpc;
|
|
68
68
|
} | {
|
|
69
69
|
Request: {
|
|
70
|
-
method: '
|
|
70
|
+
method: 'account_approveKeyAuthorization';
|
|
71
71
|
params: [
|
|
72
72
|
{
|
|
73
73
|
keyAuthorization: KeyAuthorization.Rpc;
|
|
@@ -77,20 +77,20 @@ export type Multisig = RpcSchema.From<{
|
|
|
77
77
|
}
|
|
78
78
|
];
|
|
79
79
|
};
|
|
80
|
-
ReturnType:
|
|
80
|
+
ReturnType: AccountOperation.KeyAuthorizationRpc;
|
|
81
81
|
} | {
|
|
82
82
|
Request: {
|
|
83
|
-
method: '
|
|
83
|
+
method: 'account_getConfig';
|
|
84
84
|
params: [{
|
|
85
85
|
address: Address.Address;
|
|
86
86
|
}];
|
|
87
87
|
};
|
|
88
|
-
ReturnType:
|
|
88
|
+
ReturnType: AccountConfig.Rpc | null;
|
|
89
89
|
} | {
|
|
90
90
|
Request: {
|
|
91
|
-
method: '
|
|
91
|
+
method: 'account_getOperation';
|
|
92
92
|
params: [hash: Hex.Hex];
|
|
93
93
|
};
|
|
94
|
-
ReturnType:
|
|
94
|
+
ReturnType: AccountOperation.Rpc | null;
|
|
95
95
|
}>;
|
|
96
96
|
//# sourceMappingURL=RpcSchemaTempo.d.ts.map
|