@agoric/orchestration 0.3.0-u23.0 → 0.3.0-u23.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.
- package/index.d.ts +9 -0
- package/package.json +15 -15
- package/src/axelar-types.d.ts +53 -0
- package/src/axelar-types.d.ts.map +1 -0
- package/src/cctp-chain-info.d.ts +65 -0
- package/src/cctp-chain-info.d.ts.map +1 -0
- package/src/chain-capabilities.d.ts +12 -0
- package/src/chain-capabilities.d.ts.map +1 -0
- package/src/chain-info.d.ts +10267 -0
- package/src/chain-info.d.ts.map +1 -0
- package/src/cosmos-api.d.ts +437 -0
- package/src/cosmos-api.d.ts.map +1 -0
- package/src/ethereum-api.d.ts +9 -0
- package/src/ethereum-api.d.ts.map +1 -0
- package/src/examples/auto-stake-it-tap-kit.d.ts +50 -0
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -0
- package/src/examples/auto-stake-it.contract.d.ts +34 -0
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -0
- package/src/examples/auto-stake-it.flows.d.ts +24 -0
- package/src/examples/auto-stake-it.flows.d.ts.map +1 -0
- package/src/examples/axelar-gmp-account-kit.d.ts +80 -0
- package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -0
- package/src/examples/axelar-gmp.contract.d.ts +52 -0
- package/src/examples/axelar-gmp.contract.d.ts.map +1 -0
- package/src/examples/axelar-gmp.flows.d.ts +21 -0
- package/src/examples/axelar-gmp.flows.d.ts.map +1 -0
- package/src/examples/basic-flows.contract.d.ts +32 -0
- package/src/examples/basic-flows.contract.d.ts.map +1 -0
- package/src/examples/basic-flows.flows.d.ts +20 -0
- package/src/examples/basic-flows.flows.d.ts.map +1 -0
- package/src/examples/send-anywhere.contract.d.ts +60 -0
- package/src/examples/send-anywhere.contract.d.ts.map +1 -0
- package/src/examples/send-anywhere.flows.d.ts +576 -0
- package/src/examples/send-anywhere.flows.d.ts.map +1 -0
- package/src/examples/shared.flows.d.ts +4 -0
- package/src/examples/shared.flows.d.ts.map +1 -0
- package/src/examples/stake-bld.contract.d.ts +237 -0
- package/src/examples/stake-bld.contract.d.ts.map +1 -0
- package/src/examples/stake-ica.contract.d.ts +573 -0
- package/src/examples/stake-ica.contract.d.ts.map +1 -0
- package/src/examples/staking-combinations.contract.d.ts +19 -0
- package/src/examples/staking-combinations.contract.d.ts.map +1 -0
- package/src/examples/staking-combinations.flows.d.ts +32 -0
- package/src/examples/staking-combinations.flows.d.ts.map +1 -0
- package/src/examples/swap-anything.contract.d.ts +55 -0
- package/src/examples/swap-anything.contract.d.ts.map +1 -0
- package/src/examples/swap-anything.flows.d.ts +32 -0
- package/src/examples/swap-anything.flows.d.ts.map +1 -0
- package/src/examples/swap.contract.d.ts +56 -0
- package/src/examples/swap.contract.d.ts.map +1 -0
- package/src/examples/swap.flows.d.ts +12 -0
- package/src/examples/swap.flows.d.ts.map +1 -0
- package/src/examples/unbond.contract.d.ts +21 -0
- package/src/examples/unbond.contract.d.ts.map +1 -0
- package/src/examples/unbond.flows.d.ts +6 -0
- package/src/examples/unbond.flows.d.ts.map +1 -0
- package/src/exos/chain-hub-admin.d.ts +27 -0
- package/src/exos/chain-hub-admin.d.ts.map +1 -0
- package/src/exos/chain-hub.d.ts +225 -0
- package/src/exos/chain-hub.d.ts.map +1 -0
- package/src/exos/combine-invitation-makers.d.ts +7 -0
- package/src/exos/combine-invitation-makers.d.ts.map +1 -0
- package/src/exos/cosmos-interchain-service.d.ts +49 -0
- package/src/exos/cosmos-interchain-service.d.ts.map +1 -0
- package/src/exos/cosmos-orchestration-account.d.ts +950 -0
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
- package/src/exos/exo-interfaces.d.ts +27 -0
- package/src/exos/exo-interfaces.d.ts.map +1 -0
- package/src/exos/ibc-packet.d.ts +101 -0
- package/src/exos/ibc-packet.d.ts.map +1 -0
- package/src/exos/ica-account-kit.d.ts +98 -0
- package/src/exos/ica-account-kit.d.ts.map +1 -0
- package/src/exos/icq-connection-kit.d.ts +67 -0
- package/src/exos/icq-connection-kit.d.ts.map +1 -0
- package/src/exos/local-chain-facade.d.ts +1587 -0
- package/src/exos/local-chain-facade.d.ts.map +1 -0
- package/src/exos/local-orchestration-account.d.ts +405 -0
- package/src/exos/local-orchestration-account.d.ts.map +1 -0
- package/src/exos/orchestrator.d.ts +35857 -0
- package/src/exos/orchestrator.d.ts.map +1 -0
- package/src/exos/packet-tools.d.ts +63 -0
- package/src/exos/packet-tools.d.ts.map +1 -0
- package/src/exos/portfolio-holder-kit.d.ts +154 -0
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -0
- package/src/exos/remote-chain-facade.d.ts +1549 -0
- package/src/exos/remote-chain-facade.d.ts.map +1 -0
- package/src/facade.d.ts +33 -0
- package/src/facade.d.ts.map +1 -0
- package/src/fetched-chain-info.d.ts +10275 -0
- package/src/fetched-chain-info.d.ts.map +1 -0
- package/src/fixtures/query-flows.contract.d.ts +33 -0
- package/src/fixtures/query-flows.contract.d.ts.map +1 -0
- package/src/fixtures/query-flows.flows.d.ts +20 -0
- package/src/fixtures/query-flows.flows.d.ts.map +1 -0
- package/src/orchestration-api.d.ts +315 -0
- package/src/orchestration-api.d.ts.map +1 -0
- package/src/typeGuards.d.ts +163 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/types.d.ts +25 -0
- package/src/types.d.ts.map +1 -0
- package/src/utils/abitype.d.ts +6 -0
- package/src/utils/abitype.d.ts.map +1 -0
- package/src/utils/address.d.ts +44 -0
- package/src/utils/address.d.ts.map +1 -0
- package/src/utils/agd-lib.d.ts +58 -0
- package/src/utils/agd-lib.d.ts.map +1 -0
- package/src/utils/amounts.d.ts +11 -0
- package/src/utils/amounts.d.ts.map +1 -0
- package/src/utils/asset.d.ts +6 -0
- package/src/utils/asset.d.ts.map +1 -0
- package/src/utils/axelar-static-config.d.ts +34 -0
- package/src/utils/axelar-static-config.d.ts.map +1 -0
- package/src/utils/chain-hub-helper.d.ts +14 -0
- package/src/utils/chain-hub-helper.d.ts.map +1 -0
- package/src/utils/chain-info.d.ts +5 -0
- package/src/utils/chain-info.d.ts.map +1 -0
- package/src/utils/codecs.d.ts +145 -0
- package/src/utils/codecs.d.ts.map +1 -0
- package/src/utils/cosmos.d.ts +61 -0
- package/src/utils/cosmos.d.ts.map +1 -0
- package/src/utils/denomHash.d.ts +7 -0
- package/src/utils/denomHash.d.ts.map +1 -0
- package/src/utils/exo-helpers.d.ts +156 -0
- package/src/utils/exo-helpers.d.ts.map +1 -0
- package/src/utils/gmp.d.ts +30 -0
- package/src/utils/gmp.d.ts.map +1 -0
- package/src/utils/orc.d.ts +17 -0
- package/src/utils/orc.d.ts.map +1 -0
- package/src/utils/orchestrationAccount.d.ts +91 -0
- package/src/utils/orchestrationAccount.d.ts.map +1 -0
- package/src/utils/packet.d.ts +57 -0
- package/src/utils/packet.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransfer.d.ts +221 -0
- package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
- package/src/utils/permit2.d.ts +11 -0
- package/src/utils/permit2.d.ts.map +1 -0
- package/src/utils/progress.d.ts +41 -0
- package/src/utils/progress.d.ts.map +1 -0
- package/src/utils/registry.d.ts +6 -0
- package/src/utils/registry.d.ts.map +1 -0
- package/src/utils/start-helper.d.ts +129 -0
- package/src/utils/start-helper.d.ts.map +1 -0
- package/src/utils/time.d.ts +38 -0
- package/src/utils/time.d.ts.map +1 -0
- package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
- package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
- package/src/utils/viem-utils/types.d.ts +6 -0
- package/src/utils/viem-utils/types.d.ts.map +1 -0
- package/src/utils/viem.d.ts +11 -0
- package/src/utils/viem.d.ts.map +1 -0
- package/src/utils/zcf-tools.d.ts +19 -0
- package/src/utils/zcf-tools.d.ts.map +1 -0
- package/src/utils/zoe-tools.d.ts +19 -0
- package/src/utils/zoe-tools.d.ts.map +1 -0
- package/src/vat-orchestration.d.ts +21 -0
- package/src/vat-orchestration.d.ts.map +1 -0
- package/tools/contract-tests.d.ts +1832 -0
- package/tools/contract-tests.d.ts.map +1 -0
- package/tools/ibc-mock-fixtures.d.ts +49 -0
- package/tools/ibc-mock-fixtures.d.ts.map +1 -0
- package/tools/ibc-mocks.d.ts +168 -0
- package/tools/ibc-mocks.d.ts.map +1 -0
- package/tools/make-test-address.d.ts +3 -0
- package/tools/make-test-address.d.ts.map +1 -0
- package/tools/network-fakes.d.ts +143 -0
- package/tools/network-fakes.d.ts.map +1 -0
- package/tools/protobuf-decoder.d.ts +19 -0
- package/tools/protobuf-decoder.d.ts.map +1 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Helpers for working with Uniswap Permit2 SignatureTransfer
|
|
3
|
+
* `permitWitnessTransferFrom`.
|
|
4
|
+
* @see {@link https://docs.uniswap.org/contracts/permit2/reference/signature-transfer}
|
|
5
|
+
*
|
|
6
|
+
* This is original code that was adapted for permit2-sdk, unlike @see ./permit2SignatureTransfer.ts
|
|
7
|
+
*/
|
|
8
|
+
import type { AbiParameterToPrimitiveType, TypedData } from 'abitype';
|
|
9
|
+
import type { TypedDataParameter } from '../abitype.js';
|
|
10
|
+
import type { encodeType } from '../viem-utils/hashTypedData.js';
|
|
11
|
+
declare const PrimaryTypes: import("@agoric/internal/src/keyMirror.js").KeyMirrorResult<{
|
|
12
|
+
PermitBatchWitnessTransferFrom: null;
|
|
13
|
+
PermitWitnessTransferFrom: null;
|
|
14
|
+
}>;
|
|
15
|
+
type PrimaryTypeName = keyof typeof PrimaryTypes;
|
|
16
|
+
export declare const isPermit2MessageType: (type: string) => type is PrimaryTypeName;
|
|
17
|
+
declare const permit2BaseTypeParams: {
|
|
18
|
+
PermitBatchWitnessTransferFrom: [{
|
|
19
|
+
readonly name: "permitted";
|
|
20
|
+
readonly type: "TokenPermissions[]";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "nonce";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "deadline";
|
|
29
|
+
readonly type: "uint256";
|
|
30
|
+
}];
|
|
31
|
+
PermitWitnessTransferFrom: [{
|
|
32
|
+
readonly name: "permitted";
|
|
33
|
+
readonly type: "TokenPermissions";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "spender";
|
|
36
|
+
readonly type: "address";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "nonce";
|
|
39
|
+
readonly type: "uint256";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "deadline";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Make a function for returning the `witnessTypeString` argument to use in a
|
|
47
|
+
* `permitWitnessTransferFrom` call.
|
|
48
|
+
*/
|
|
49
|
+
export declare const makeWitnessTypeStringExtractor: (powers: {
|
|
50
|
+
encodeType: typeof encodeType;
|
|
51
|
+
}) => (types: TypedData) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Confirm that the input is a EIP-712 `types` record with a single struct
|
|
54
|
+
* definition for the first argument to a `permitWitnessTransferFrom` call
|
|
55
|
+
* (i.e., named either "PermitWitnessTransferFrom" for a single-token transfer
|
|
56
|
+
* or "PermitBatchWitnessTransferFrom" for a multi-token transfer), and return
|
|
57
|
+
* the TypedDataParameter describing the witness field of that definition.
|
|
58
|
+
*/
|
|
59
|
+
export declare const extractWitnessFieldFromTypes: <T extends Readonly<TypedDataParameter>>(types: { [K in PrimaryTypeName]: Record<K, readonly [...(typeof permit2BaseTypeParams)[K], T]>; }[PrimaryTypeName]) => T;
|
|
60
|
+
export declare const TokenPermissionsComponents: [{
|
|
61
|
+
readonly name: "token";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "amount";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}];
|
|
67
|
+
export declare const TokenPermissionsInternalTypeName: "struct ISignatureTransfer.TokenPermissions";
|
|
68
|
+
export declare const PermitTransferFromComponents: [{
|
|
69
|
+
readonly name: "permitted";
|
|
70
|
+
readonly type: "tuple";
|
|
71
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions";
|
|
72
|
+
readonly components: [{
|
|
73
|
+
readonly name: "token";
|
|
74
|
+
readonly type: "address";
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "amount";
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
}];
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "nonce";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "deadline";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
}];
|
|
86
|
+
export declare const PermitTransferFromInternalTypeName: "struct ISignatureTransfer.PermitTransferFrom";
|
|
87
|
+
export type PermitTransferFromStruct = AbiParameterToPrimitiveType<{
|
|
88
|
+
type: 'tuple';
|
|
89
|
+
internalType: typeof PermitTransferFromInternalTypeName;
|
|
90
|
+
components: typeof PermitTransferFromComponents;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const PermitBatchTransferFromComponents: [{
|
|
93
|
+
readonly name: "permitted";
|
|
94
|
+
readonly type: "tuple[]";
|
|
95
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions[]";
|
|
96
|
+
readonly components: [{
|
|
97
|
+
readonly name: "token";
|
|
98
|
+
readonly type: "address";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "amount";
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
}];
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "nonce";
|
|
105
|
+
readonly type: "uint256";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "deadline";
|
|
108
|
+
readonly type: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
export declare const PermitBatchTransferFromInternalTypeName: "struct ISignatureTransfer.PermitBatchTransferFrom";
|
|
111
|
+
export type PermitBatchTransferFromStruct = AbiParameterToPrimitiveType<{
|
|
112
|
+
type: 'tuple';
|
|
113
|
+
internalType: typeof PermitBatchTransferFromInternalTypeName;
|
|
114
|
+
components: typeof PermitBatchTransferFromComponents;
|
|
115
|
+
}>;
|
|
116
|
+
export declare const SignatureTransferDetailsComponents: [{
|
|
117
|
+
readonly name: "to";
|
|
118
|
+
readonly type: "address";
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "requestedAmount";
|
|
121
|
+
readonly type: "uint256";
|
|
122
|
+
}];
|
|
123
|
+
export declare const SignatureTransferDetailsInternalTypeName: "struct ISignatureTransfer.SignatureTransferDetails";
|
|
124
|
+
export type SignatureTransferDetailsStruct = AbiParameterToPrimitiveType<{
|
|
125
|
+
type: 'tuple';
|
|
126
|
+
internalType: typeof SignatureTransferDetailsInternalTypeName;
|
|
127
|
+
components: typeof SignatureTransferDetailsComponents;
|
|
128
|
+
}>;
|
|
129
|
+
export declare const PermitWitnessTransferFromInputComponents: [{
|
|
130
|
+
readonly name: "permit";
|
|
131
|
+
readonly type: "tuple";
|
|
132
|
+
readonly internalType: "struct ISignatureTransfer.PermitTransferFrom";
|
|
133
|
+
readonly components: [{
|
|
134
|
+
readonly name: "permitted";
|
|
135
|
+
readonly type: "tuple";
|
|
136
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions";
|
|
137
|
+
readonly components: [{
|
|
138
|
+
readonly name: "token";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "amount";
|
|
142
|
+
readonly type: "uint256";
|
|
143
|
+
}];
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "nonce";
|
|
146
|
+
readonly type: "uint256";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "deadline";
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
}];
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "transferDetails";
|
|
153
|
+
readonly type: "tuple";
|
|
154
|
+
readonly internalType: "struct ISignatureTransfer.SignatureTransferDetails";
|
|
155
|
+
readonly components: [{
|
|
156
|
+
readonly name: "to";
|
|
157
|
+
readonly type: "address";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "requestedAmount";
|
|
160
|
+
readonly type: "uint256";
|
|
161
|
+
}];
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "owner";
|
|
164
|
+
readonly type: "address";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "witness";
|
|
167
|
+
readonly type: "bytes32";
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "witnessTypeString";
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "signature";
|
|
173
|
+
readonly type: "bytes";
|
|
174
|
+
}];
|
|
175
|
+
export type PermitWitnessTransferFromPayload = AbiParameterToPrimitiveType<{
|
|
176
|
+
type: 'tuple';
|
|
177
|
+
components: typeof PermitWitnessTransferFromInputComponents;
|
|
178
|
+
}>;
|
|
179
|
+
export declare const BatchPermitWitnessTransferFromInputComponents: [{
|
|
180
|
+
readonly name: "permit";
|
|
181
|
+
readonly type: "tuple";
|
|
182
|
+
readonly internalType: "struct ISignatureTransfer.PermitBatchTransferFrom";
|
|
183
|
+
readonly components: [{
|
|
184
|
+
readonly name: "permitted";
|
|
185
|
+
readonly type: "tuple[]";
|
|
186
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions[]";
|
|
187
|
+
readonly components: [{
|
|
188
|
+
readonly name: "token";
|
|
189
|
+
readonly type: "address";
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "amount";
|
|
192
|
+
readonly type: "uint256";
|
|
193
|
+
}];
|
|
194
|
+
}, {
|
|
195
|
+
readonly name: "nonce";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "deadline";
|
|
199
|
+
readonly type: "uint256";
|
|
200
|
+
}];
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "transferDetails";
|
|
203
|
+
readonly type: "tuple[]";
|
|
204
|
+
readonly internalType: "struct ISignatureTransfer.SignatureTransferDetails[]";
|
|
205
|
+
readonly components: [{
|
|
206
|
+
readonly name: "to";
|
|
207
|
+
readonly type: "address";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "requestedAmount";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "owner";
|
|
214
|
+
readonly type: "address";
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "witness";
|
|
217
|
+
readonly type: "bytes32";
|
|
218
|
+
}, {
|
|
219
|
+
readonly name: "witnessTypeString";
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "signature";
|
|
223
|
+
readonly type: "bytes";
|
|
224
|
+
}];
|
|
225
|
+
export type BatchPermitWitnessTransferFromPayload = AbiParameterToPrimitiveType<{
|
|
226
|
+
type: 'tuple';
|
|
227
|
+
components: typeof BatchPermitWitnessTransferFromInputComponents;
|
|
228
|
+
}>;
|
|
229
|
+
export declare const PermitWitnessTransferFromFunctionABIType: {
|
|
230
|
+
readonly name: "permitWitnessTransferFrom";
|
|
231
|
+
readonly inputs: [{
|
|
232
|
+
readonly name: "permit";
|
|
233
|
+
readonly type: "tuple";
|
|
234
|
+
readonly internalType: "struct ISignatureTransfer.PermitTransferFrom";
|
|
235
|
+
readonly components: [{
|
|
236
|
+
readonly name: "permitted";
|
|
237
|
+
readonly type: "tuple";
|
|
238
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions";
|
|
239
|
+
readonly components: [{
|
|
240
|
+
readonly name: "token";
|
|
241
|
+
readonly type: "address";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "amount";
|
|
244
|
+
readonly type: "uint256";
|
|
245
|
+
}];
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "nonce";
|
|
248
|
+
readonly type: "uint256";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "deadline";
|
|
251
|
+
readonly type: "uint256";
|
|
252
|
+
}];
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "transferDetails";
|
|
255
|
+
readonly type: "tuple";
|
|
256
|
+
readonly internalType: "struct ISignatureTransfer.SignatureTransferDetails";
|
|
257
|
+
readonly components: [{
|
|
258
|
+
readonly name: "to";
|
|
259
|
+
readonly type: "address";
|
|
260
|
+
}, {
|
|
261
|
+
readonly name: "requestedAmount";
|
|
262
|
+
readonly type: "uint256";
|
|
263
|
+
}];
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "owner";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "witness";
|
|
269
|
+
readonly type: "bytes32";
|
|
270
|
+
}, {
|
|
271
|
+
readonly name: "witnessTypeString";
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "signature";
|
|
275
|
+
readonly type: "bytes";
|
|
276
|
+
}];
|
|
277
|
+
readonly outputs: readonly [];
|
|
278
|
+
readonly stateMutability: "nonpayable";
|
|
279
|
+
readonly type: "function";
|
|
280
|
+
};
|
|
281
|
+
export declare const BatchPermitWitnessTransferFunctionABIType: {
|
|
282
|
+
readonly name: "permitWitnessTransferFrom";
|
|
283
|
+
readonly inputs: [{
|
|
284
|
+
readonly name: "permit";
|
|
285
|
+
readonly type: "tuple";
|
|
286
|
+
readonly internalType: "struct ISignatureTransfer.PermitBatchTransferFrom";
|
|
287
|
+
readonly components: [{
|
|
288
|
+
readonly name: "permitted";
|
|
289
|
+
readonly type: "tuple[]";
|
|
290
|
+
readonly internalType: "struct ISignatureTransfer.TokenPermissions[]";
|
|
291
|
+
readonly components: [{
|
|
292
|
+
readonly name: "token";
|
|
293
|
+
readonly type: "address";
|
|
294
|
+
}, {
|
|
295
|
+
readonly name: "amount";
|
|
296
|
+
readonly type: "uint256";
|
|
297
|
+
}];
|
|
298
|
+
}, {
|
|
299
|
+
readonly name: "nonce";
|
|
300
|
+
readonly type: "uint256";
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "deadline";
|
|
303
|
+
readonly type: "uint256";
|
|
304
|
+
}];
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "transferDetails";
|
|
307
|
+
readonly type: "tuple[]";
|
|
308
|
+
readonly internalType: "struct ISignatureTransfer.SignatureTransferDetails[]";
|
|
309
|
+
readonly components: [{
|
|
310
|
+
readonly name: "to";
|
|
311
|
+
readonly type: "address";
|
|
312
|
+
}, {
|
|
313
|
+
readonly name: "requestedAmount";
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}];
|
|
316
|
+
}, {
|
|
317
|
+
readonly name: "owner";
|
|
318
|
+
readonly type: "address";
|
|
319
|
+
}, {
|
|
320
|
+
readonly name: "witness";
|
|
321
|
+
readonly type: "bytes32";
|
|
322
|
+
}, {
|
|
323
|
+
readonly name: "witnessTypeString";
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
}, {
|
|
326
|
+
readonly name: "signature";
|
|
327
|
+
readonly type: "bytes";
|
|
328
|
+
}];
|
|
329
|
+
readonly outputs: readonly [];
|
|
330
|
+
readonly stateMutability: "nonpayable";
|
|
331
|
+
readonly type: "function";
|
|
332
|
+
};
|
|
333
|
+
export {};
|
|
334
|
+
//# sourceMappingURL=signatureTransferHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signatureTransferHelpers.d.ts","sourceRoot":"","sources":["signatureTransferHelpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file entry point for orchestration's permit2 utils
|
|
3
|
+
*
|
|
4
|
+
* This file should eventually become a `.js` file once we can strip types from
|
|
5
|
+
* `.ts` files and rewrite relative import specifiers in `.js` files.
|
|
6
|
+
*
|
|
7
|
+
* NPM consumers could use jsr.io to consume this in the meantime.
|
|
8
|
+
*/
|
|
9
|
+
export * from './permit2/signatureTransfer.js';
|
|
10
|
+
export * from './permit2/signatureTransferHelpers.js';
|
|
11
|
+
//# sourceMappingURL=permit2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permit2.d.ts","sourceRoot":"","sources":["permit2.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export namespace progressTrackerAsyncFlowUtils {
|
|
2
|
+
function promiseFromVow<T>(specimen: T): Promise<Fulfilled<T>>;
|
|
3
|
+
function reduceProgressReports<A = unknown>(tracker: ProgressTracker, reducer: PublicationReducer<ProgressReport, A>, initialAccum: A): Promise<A>;
|
|
4
|
+
}
|
|
5
|
+
export function prepareProgressTracker(zone: Zone, { vowTools: { makeVowKit } }: {
|
|
6
|
+
vowTools: Pick<VowTools, "makeVowKit">;
|
|
7
|
+
}): () => import("@endo/exo").Guarded<{
|
|
8
|
+
getCurrentProgressReport(): ProgressReport;
|
|
9
|
+
/**
|
|
10
|
+
* @param {ProgressReport} progressReport
|
|
11
|
+
*/
|
|
12
|
+
update(progressReport: ProgressReport): ProgressReport;
|
|
13
|
+
finish(): ProgressReport;
|
|
14
|
+
/**
|
|
15
|
+
* CAVEAT: Intended for use only by `progress.js` utilities.
|
|
16
|
+
*
|
|
17
|
+
* @returns {PublicationInternals<ProgressReport>}
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
exposePublicationInternals(): PublicationInternals<ProgressReport>;
|
|
21
|
+
}>;
|
|
22
|
+
export type ProgressReport = Record<string, any>;
|
|
23
|
+
export type PublicationInternals<T> = {
|
|
24
|
+
value: T;
|
|
25
|
+
tail: EVow<PublicationInternals<T>>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Called on the value of each linked T. This
|
|
29
|
+
* function should perform any side-effects it can when it receives a new
|
|
30
|
+
* value, since there is no guarantee that the ProgressRecord tail will be
|
|
31
|
+
* prompt (it may take a long time with cross-chain communication) or ever
|
|
32
|
+
* fulfill (it may result in a rejection).
|
|
33
|
+
*/
|
|
34
|
+
export type PublicationReducer<T, A = unknown> = (value: T | undefined | null, accum: A) => EVow<A | null>;
|
|
35
|
+
export type MakeProgressTracker = ReturnType<typeof prepareProgressTracker>;
|
|
36
|
+
export type ProgressTracker = ReturnType<MakeProgressTracker>;
|
|
37
|
+
import type { Fulfilled } from '@agoric/vow';
|
|
38
|
+
import type { Zone } from '@agoric/base-zone';
|
|
39
|
+
import type { VowTools } from '@agoric/vow';
|
|
40
|
+
import type { EVow } from '@agoric/vow';
|
|
41
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["progress.js"],"names":[],"mappings":";IAgDkB,wBAJH,CAAC,YACH,CAAC,GACC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAQjC;IAcsB,+BATT,CAAC,qBACJ,eAAe,WACf,kBAAkB,CAAC,cAAc,EAAE,CAAC,CAAC,gBACrC,CAAC,GAIC,OAAO,CAAC,CAAC,CAAC,CA0BtB;;AAYI,6CAJI,IAAI,gCAEZ;IAA6C,QAAQ,EAA7C,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC;CACtC;;IA0BO;;OAEG;2BADQ,cAAc;;IAyBzB;;;;;OAKG;kCAFU,oBAAoB,CAAC,cAAc,CAAC;GAYxD;6BA9JY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;iCAInB,CAAC;WAEA,CAAC;UACD,KAAK,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;+BAI9B,CAAC,EACA,CAAC,sBAMJ,CAAC,GAAG,SAAS,GAAG,IAAI,SAEpB,CAAC,KACC,KAAK,CAAC,GAAG,IAAI,CAAC;kCA6Id,UAAU,CAAC,OAAO,sBAAsB,CAAC;8BAIzC,UAAU,CAAC,mBAAmB,CAAC;+BA3KA,aAAa;0BAClC,mBAAmB;8BADE,aAAa;0BAAb,aAAa"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function convertChainInfo(registry: Pick<ChainRegistryClient, "chains" | "ibcData">): Promise<{
|
|
2
|
+
[k: string]: CosmosChainInfo;
|
|
3
|
+
}>;
|
|
4
|
+
import type { ChainRegistryClient } from '@chain-registry/client';
|
|
5
|
+
import type { CosmosChainInfo } from '../cosmos-api.js';
|
|
6
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["registry.js"],"names":[],"mappings":"AAqFO,2CAFI,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,SAAS,CAAC;;GAgDzD;yCAzHqC,wBAAwB;qCAC5B,kBAAkB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: OrchestrationPowers, remoteMarshaller: Remote<Marshaller>, opts?: {
|
|
2
|
+
chainInfoValueShape?: WithOrchestrationOpts["chainInfoValueShape"];
|
|
3
|
+
}): {
|
|
4
|
+
makeOrchestrateKit: (zone: Zone) => {
|
|
5
|
+
orchestrate: <HC, GF extends import("../orchestration-api.js").OrchestrationFlow<import("@agoric/async-flow").GuestInterface<HC>>>(durableName: string, hostCtx: HC, guestFn: GF) => HostForGuest<GF>;
|
|
6
|
+
orchestrateAll: <HC extends Record<string, any>, GFM extends {
|
|
7
|
+
[durableName: string]: import("../orchestration-api.js").OrchestrationFlow<import("@agoric/async-flow").GuestInterface<HC>>;
|
|
8
|
+
}>(guestFns: GFM, hostCtx: HC) => { [N in keyof GFM]: HostForGuest<GFM[N]>; };
|
|
9
|
+
};
|
|
10
|
+
baggage: Baggage;
|
|
11
|
+
cachingMarshaller: {
|
|
12
|
+
serialize: (val?: import("@endo/pass-style").Passable) => import("@agoric/vow").ERef<import("@endo/marshal").CapData<unknown>>;
|
|
13
|
+
unserialize: (data: import("@endo/marshal").CapData<unknown>) => any;
|
|
14
|
+
toCapData: (val?: import("@endo/pass-style").Passable) => import("@agoric/vow").ERef<import("@endo/marshal").CapData<unknown>>;
|
|
15
|
+
fromCapData: (data: import("@endo/marshal").CapData<unknown>) => any;
|
|
16
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
17
|
+
serialize: (val?: import("@endo/pass-style").Passable) => import("@agoric/vow").ERef<import("@endo/marshal").CapData<unknown>>;
|
|
18
|
+
unserialize: (data: import("@endo/marshal").CapData<unknown>) => any;
|
|
19
|
+
toCapData: (val?: import("@endo/pass-style").Passable) => import("@agoric/vow").ERef<import("@endo/marshal").CapData<unknown>>;
|
|
20
|
+
fromCapData: (data: import("@endo/marshal").CapData<unknown>) => any;
|
|
21
|
+
}>;
|
|
22
|
+
chainHub: import("@endo/exo").Guarded<{
|
|
23
|
+
registerChain(name: string, chainInfo: import("../orchestration-api.js").ChainInfo): void;
|
|
24
|
+
updateChain(chainName: string, chainInfo: import("../orchestration-api.js").ChainInfo): void;
|
|
25
|
+
getChainInfo<K extends string>(chainName: K): import("@agoric/vow").Vow<ActualChainInfo<K>>;
|
|
26
|
+
getChainInfoByChainId(chainId: import("../orchestration-api.js").CaipChainId): import("../orchestration-api.js").ChainInfo;
|
|
27
|
+
registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: import("@agoric/network/ibc").IBCConnectionInfo): void;
|
|
28
|
+
updateConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: import("@agoric/network/ibc").IBCConnectionInfo): void;
|
|
29
|
+
getConnectionInfo(primary: string | {
|
|
30
|
+
chainId: string;
|
|
31
|
+
}, counter: string | {
|
|
32
|
+
chainId: string;
|
|
33
|
+
}): import("@agoric/vow").Vow<import("@agoric/network/ibc").IBCConnectionInfo>;
|
|
34
|
+
getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): import("@agoric/vow").Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, import("@agoric/network/ibc").IBCConnectionInfo]>;
|
|
35
|
+
registerAsset(denom: import("../orchestration-api.js").Denom, detail: DenomDetail): void;
|
|
36
|
+
updateAsset(denom: import("../orchestration-api.js").Denom, detail: DenomDetail): void;
|
|
37
|
+
getAsset(denom: import("../orchestration-api.js").Denom, srcChainName: string): DenomDetail | undefined;
|
|
38
|
+
getDenom(brand: import("@agoric/ertp").Brand): import("../orchestration-api.js").Denom | undefined;
|
|
39
|
+
resolveAccountId(partialId: import("../orchestration-api.js").AccountId | import("../cosmos-api.js").Bech32Address): import("../orchestration-api.js").AccountId;
|
|
40
|
+
coerceCosmosAddress(partialId: import("../orchestration-api.js").AccountIdArg | import("../cosmos-api.js").Bech32Address): import("../orchestration-api.js").CosmosChainAddress;
|
|
41
|
+
makeTransferRoute(destination: import("../orchestration-api.js").AccountIdArg | import("../cosmos-api.js").Bech32Address, denomAmount: import("../orchestration-api.js").DenomAmount, srcChainName: string, forwardOpts?: import("../cosmos-api.js").IBCMsgTransferOptions["forwardOpts"]): import("../cosmos-api.js").TransferRoute;
|
|
42
|
+
isEmpty(): boolean;
|
|
43
|
+
}>;
|
|
44
|
+
vowTools: import("@agoric/vow").VowTools;
|
|
45
|
+
asyncFlowTools: {
|
|
46
|
+
prepareAsyncFlowKit: (zone: Zone, tag: string, guestAsyncFunc: import("@agoric/async-flow").GuestAsyncFunc, options?: {
|
|
47
|
+
startEager?: boolean;
|
|
48
|
+
}) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
|
|
49
|
+
flow: {
|
|
50
|
+
getFlowState(): import("@agoric/async-flow").FlowState;
|
|
51
|
+
restart(eager?: boolean): void;
|
|
52
|
+
wake(): void;
|
|
53
|
+
getOutcome(): import("@agoric/vow").Vow<any>;
|
|
54
|
+
dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
|
|
55
|
+
getOptFatalProblem(): any;
|
|
56
|
+
};
|
|
57
|
+
admin: {
|
|
58
|
+
reset(): void;
|
|
59
|
+
complete(): void;
|
|
60
|
+
panic(fatalProblem: any): never;
|
|
61
|
+
};
|
|
62
|
+
wakeWatcher: {
|
|
63
|
+
onFulfilled(_fulfillment: any): void;
|
|
64
|
+
onRejected(_fulfillment: any): void;
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
asyncFlow: <F extends import("@agoric/async-flow").GuestAsyncFunc>(zone: Zone, tag: string, guestFunc: F, options?: {
|
|
68
|
+
startEager?: boolean;
|
|
69
|
+
}) => import("@agoric/async-flow").HostOf<F>;
|
|
70
|
+
adminAsyncFlow: import("@endo/exo").Guarded<{
|
|
71
|
+
getFailures(): import("@endo/patterns").CopyMap<any, import("@endo/pass-style").Passable>;
|
|
72
|
+
wakeAll(): void;
|
|
73
|
+
getFlowForOutcomeVow(outcomeVow: any): any;
|
|
74
|
+
}>;
|
|
75
|
+
allWokenP: Promise<void>;
|
|
76
|
+
prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
|
|
77
|
+
};
|
|
78
|
+
zcfTools: {
|
|
79
|
+
assertUniqueKeyword: (keyword: string) => void;
|
|
80
|
+
atomicRearrange: (transfers: import("@agoric/zoe").TransferPart[]) => void;
|
|
81
|
+
makeInvitation: <R, A = undefined>(offerHandler: import("@agoric/zoe").OfferHandler<import("@agoric/vow").ERef<R>, A>, description: string, customDetails?: object, proposalShape?: Pattern) => import("@agoric/vow").Vow<import("@agoric/zoe").Invitation<R, A>>;
|
|
82
|
+
};
|
|
83
|
+
zoeTools: {
|
|
84
|
+
localTransfer: (srcSeat: import("@agoric/zoe").ZCFSeat, localAccount: import("../cosmos-api.js").LocalAccountMethods, amounts: import("@agoric/zoe").AmountKeywordRecord) => import("@agoric/vow").Vow<void>;
|
|
85
|
+
withdrawToSeat: (localAccount: import("../cosmos-api.js").LocalAccountMethods, destSeat: import("@agoric/zoe").ZCFSeat, amounts: import("@agoric/zoe").AmountKeywordRecord) => import("@agoric/vow").Vow<void>;
|
|
86
|
+
};
|
|
87
|
+
zone: Zone;
|
|
88
|
+
orchestrate: <HC, GF extends import("../orchestration-api.js").OrchestrationFlow<import("@agoric/async-flow").GuestInterface<HC>>>(durableName: string, hostCtx: HC, guestFn: GF) => HostForGuest<GF>;
|
|
89
|
+
orchestrateAll: <HC extends Record<string, any>, GFM extends {
|
|
90
|
+
[durableName: string]: import("../orchestration-api.js").OrchestrationFlow<import("@agoric/async-flow").GuestInterface<HC>>;
|
|
91
|
+
}>(guestFns: GFM, hostCtx: HC) => { [N in keyof GFM]: HostForGuest<GFM[N]>; };
|
|
92
|
+
};
|
|
93
|
+
export function withOrchestration<CT extends Record<string, unknown>, PA extends OrchestrationPowers & {
|
|
94
|
+
marshaller: Remote<Marshaller>;
|
|
95
|
+
}, R>(contractFn: (zcf: ZCF<CT>, privateArgs: PA, zone: Zone, tools: OrchestrationTools) => Promise<R>, opts?: WithOrchestrationOpts): (zcf: ZCF<CT>, privateArgs: PA, baggage: Baggage) => Promise<R>;
|
|
96
|
+
export type OrchestrationPowers = {
|
|
97
|
+
localchain: Remote<LocalChain>;
|
|
98
|
+
orchestrationService: Remote<CosmosInterchainService>;
|
|
99
|
+
storageNode?: Remote<StorageNode>;
|
|
100
|
+
timerService: Remote<TimerService>;
|
|
101
|
+
agoricNames: Remote<NameHub>;
|
|
102
|
+
};
|
|
103
|
+
export type WithOrchestrationOpts = {
|
|
104
|
+
/**
|
|
105
|
+
* - Controls whether account
|
|
106
|
+
* information (address, channel identifiers for ICAs) should be automatically
|
|
107
|
+
* published to vstorage
|
|
108
|
+
*/
|
|
109
|
+
publishAccountInfo?: boolean | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* - Overrides the default valueShape
|
|
112
|
+
* for ChainHub's `chainInfos: MapStore`. Intended to support a legacy version
|
|
113
|
+
* of ChainHub for FastUSDC.
|
|
114
|
+
*/
|
|
115
|
+
chainInfoValueShape?: Pattern;
|
|
116
|
+
};
|
|
117
|
+
export type OrchestrationTools = Omit<ReturnType<typeof provideOrchestration>, "zone">;
|
|
118
|
+
import type { ZCF } from '@agoric/zoe';
|
|
119
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
120
|
+
import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
|
|
121
|
+
import type { Remote } from '@agoric/vow';
|
|
122
|
+
import type { Zone } from '@agoric/zone';
|
|
123
|
+
import type { Pattern } from '@endo/patterns';
|
|
124
|
+
import type { LocalChain } from '@agoric/vats/src/localchain.js';
|
|
125
|
+
import type { CosmosInterchainService } from '../exos/exo-interfaces.js';
|
|
126
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
127
|
+
import type { TimerService } from '@agoric/time';
|
|
128
|
+
import type { NameHub } from '@agoric/vats';
|
|
129
|
+
//# sourceMappingURL=start-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAiEO,0CARI,GAAG,WACH,OAAO,gBACP,mBAAmB,oBACnB,OAAO,UAAU,CAAC,SAE1B;IAA4D,mBAAmB,GAAvE,qBAAqB,CAAC,qBAAqB,CAAC;CACpD;+BA6GU,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAnFH,CAAC;;;;;;;;;;;;;;;;;;;;;sBAyK6sV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EApD5tV;AA+BM,kCAfgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IAC/B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;CAC/B,EACQ,CAAC,cACH,CACN,GAAG,EAAE,IAAI,EAAE,CAAC,EACZ,WAAW,EAAE,EAAE,EACf,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,kBAAkB,KACtB,OAAO,CAAC,CAAC,CAAC,SACP,qBAAqB,GACnB,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAsBzE;kCAhOU;IACR,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,OAAO,WAAW,CAAC,CAAC;IAClC,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;;;;;;;;;;;;;0BAQU,OAAO;;iCAmKP,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,MAAM,CAAC;yBArL7C,aAAa;6BANT,kBAAkB;gCAJF,0CAA0C;4BAM3D,aAAa;0BACf,cAAc;6BACX,gBAAgB;gCANb,gCAAgC;6CAOnB,2BAA2B;iCAT3B,0CAA0C;kCAGrD,cAAc;6BAEnB,cAAc"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XXX should this be durable? resumable?
|
|
3
|
+
*
|
|
4
|
+
* @param {Remote<TimerService>} timer
|
|
5
|
+
*/
|
|
6
|
+
export function makeTimestampHelper(timer: Remote<TimerService>): {
|
|
7
|
+
/**
|
|
8
|
+
* XXX do this need to be resumable / use Vows?
|
|
9
|
+
*
|
|
10
|
+
* Takes the current time from ChainTimerService and adds a relative time
|
|
11
|
+
* (`secondsInFuture`) to determine a timeout timestamp in nanoseconds.
|
|
12
|
+
* Useful for {@link MsgTransfer.timeoutTimestamp}.
|
|
13
|
+
*
|
|
14
|
+
* @param {bigint} [secondsInFuture] defaults to 300n (5 minutes)
|
|
15
|
+
* @returns {Promise<bigint>} Timeout timestamp in absolute nanoseconds
|
|
16
|
+
* since unix epoch
|
|
17
|
+
*/
|
|
18
|
+
getTimeoutTimestampNS(secondsInFuture?: bigint): Promise<bigint>;
|
|
19
|
+
/** @param {IBCMsgTransferOptions} [opts] */
|
|
20
|
+
vowOrValueFromOpts(opts?: IBCMsgTransferOptions): bigint | Promise<bigint> | undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @import {TimerService} from '@agoric/time';
|
|
24
|
+
* @import {Remote} from '@agoric/internal';
|
|
25
|
+
* @import {EReturn} from '@endo/far';
|
|
26
|
+
* @import {IBCMsgTransferOptions} from '../cosmos-api.js';
|
|
27
|
+
* @import {MsgTransfer} from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
|
|
28
|
+
*/
|
|
29
|
+
export const SECONDS_PER_MINUTE: 60n;
|
|
30
|
+
export const MILLISECONDS_PER_SECOND: 1000n;
|
|
31
|
+
export const NANOSECONDS_PER_MILLISECOND: 1000000n;
|
|
32
|
+
export const NANOSECONDS_PER_SECOND: 1000000000n;
|
|
33
|
+
export type TimestampHelper = EReturn<typeof makeTimestampHelper>;
|
|
34
|
+
import type { TimerService } from '@agoric/time';
|
|
35
|
+
import type { Remote } from '@agoric/internal';
|
|
36
|
+
import type { IBCMsgTransferOptions } from '../cosmos-api.js';
|
|
37
|
+
import type { EReturn } from '@endo/far';
|
|
38
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,2CAFW,OAAO,YAAY,CAAC;IAI3B;;;;;;;;;;OAUG;4CAHQ,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC;IAc5B,4CAA4C;8BAAhC,qBAAqB;EAYpC;AAtDD;;;;;;GAMG;AAEH,iCAAkC,GAAG,CAAC;AACtC,sCAAuC,KAAK,CAAC;AAC7C,0CAA2C,QAAU,CAAC;AACtD,qCAAsC,WAAc,CAAC;8BA6CvC,QAAQ,OAAO,mBAAmB,CAAC;kCAvDlB,cAAc;4BACpB,kBAAkB;2CAEH,kBAAkB;6BADhC,WAAW"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file viem internal typedData utils exported for direct usage
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* Copyright (c) 2023-present weth, LLC
|
|
6
|
+
* Copied from https://github.com/wevm/viem/blob/ea0b9d4c391567dd811acbfd889121bb9cb1c26c/src/utils/signature/hashTypedData.ts
|
|
7
|
+
*/
|
|
8
|
+
type MessageTypeProperty = {
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Serialize an EIP-712 struct definition to a string per
|
|
14
|
+
* https://eips.ethereum.org/EIPS/eip-712#definition-of-encodetype
|
|
15
|
+
*/
|
|
16
|
+
export declare function encodeType({ primaryType, types, }: {
|
|
17
|
+
primaryType: string;
|
|
18
|
+
types: Record<string, readonly MessageTypeProperty[]>;
|
|
19
|
+
}): string;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=hashTypedData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashTypedData.d.ts","sourceRoot":"","sources":["hashTypedData.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,KAAK,GACN,EAAE;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC,CAAC;CACvD,UAaA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ByteArray, Hex, Signature, TypedData, TypedDataDefinition } from 'viem';
|
|
2
|
+
export type WithSignature<T> = T & {
|
|
3
|
+
signature: Hex | ByteArray | Signature;
|
|
4
|
+
};
|
|
5
|
+
export type SignedTypedDataDefinition<typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData, primaryTypes = typedData extends TypedData ? keyof typedData : string> = WithSignature<TypedDataDefinition<typedData, primaryType, primaryTypes>>;
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,GAAG,EACH,SAAS,EACT,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAC;AAEd,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG;IACjC,SAAS,EAAE,GAAG,GAAG,SAAS,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,yBAAyB,CACnC,SAAS,SAAS,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACjE,WAAW,SAAS,MAAM,SAAS,GAAG,cAAc,GAAG,MAAM,SAAS,EAEtE,YAAY,GAAG,SAAS,SAAS,SAAS,GAAG,MAAM,SAAS,GAAG,MAAM,IACnE,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file entry point for some common viem utils
|
|
3
|
+
*
|
|
4
|
+
* This file should eventually become a `.js` file once we can strip types from
|
|
5
|
+
* `.ts` files and rewrite relative import specifiers in `.js` files.
|
|
6
|
+
*
|
|
7
|
+
* NPM consumers could use jsr.io to consume this in the meantime.
|
|
8
|
+
*/
|
|
9
|
+
export * from './viem-utils/hashTypedData.js';
|
|
10
|
+
export * from './viem-utils/types.js';
|
|
11
|
+
//# sourceMappingURL=viem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viem.d.ts","sourceRoot":"","sources":["viem.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
|