@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.
Files changed (170) hide show
  1. package/index.d.ts +9 -0
  2. package/package.json +15 -15
  3. package/src/axelar-types.d.ts +53 -0
  4. package/src/axelar-types.d.ts.map +1 -0
  5. package/src/cctp-chain-info.d.ts +65 -0
  6. package/src/cctp-chain-info.d.ts.map +1 -0
  7. package/src/chain-capabilities.d.ts +12 -0
  8. package/src/chain-capabilities.d.ts.map +1 -0
  9. package/src/chain-info.d.ts +10267 -0
  10. package/src/chain-info.d.ts.map +1 -0
  11. package/src/cosmos-api.d.ts +437 -0
  12. package/src/cosmos-api.d.ts.map +1 -0
  13. package/src/ethereum-api.d.ts +9 -0
  14. package/src/ethereum-api.d.ts.map +1 -0
  15. package/src/examples/auto-stake-it-tap-kit.d.ts +50 -0
  16. package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -0
  17. package/src/examples/auto-stake-it.contract.d.ts +34 -0
  18. package/src/examples/auto-stake-it.contract.d.ts.map +1 -0
  19. package/src/examples/auto-stake-it.flows.d.ts +24 -0
  20. package/src/examples/auto-stake-it.flows.d.ts.map +1 -0
  21. package/src/examples/axelar-gmp-account-kit.d.ts +80 -0
  22. package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -0
  23. package/src/examples/axelar-gmp.contract.d.ts +52 -0
  24. package/src/examples/axelar-gmp.contract.d.ts.map +1 -0
  25. package/src/examples/axelar-gmp.flows.d.ts +21 -0
  26. package/src/examples/axelar-gmp.flows.d.ts.map +1 -0
  27. package/src/examples/basic-flows.contract.d.ts +32 -0
  28. package/src/examples/basic-flows.contract.d.ts.map +1 -0
  29. package/src/examples/basic-flows.flows.d.ts +20 -0
  30. package/src/examples/basic-flows.flows.d.ts.map +1 -0
  31. package/src/examples/send-anywhere.contract.d.ts +60 -0
  32. package/src/examples/send-anywhere.contract.d.ts.map +1 -0
  33. package/src/examples/send-anywhere.flows.d.ts +576 -0
  34. package/src/examples/send-anywhere.flows.d.ts.map +1 -0
  35. package/src/examples/shared.flows.d.ts +4 -0
  36. package/src/examples/shared.flows.d.ts.map +1 -0
  37. package/src/examples/stake-bld.contract.d.ts +237 -0
  38. package/src/examples/stake-bld.contract.d.ts.map +1 -0
  39. package/src/examples/stake-ica.contract.d.ts +573 -0
  40. package/src/examples/stake-ica.contract.d.ts.map +1 -0
  41. package/src/examples/staking-combinations.contract.d.ts +19 -0
  42. package/src/examples/staking-combinations.contract.d.ts.map +1 -0
  43. package/src/examples/staking-combinations.flows.d.ts +32 -0
  44. package/src/examples/staking-combinations.flows.d.ts.map +1 -0
  45. package/src/examples/swap-anything.contract.d.ts +55 -0
  46. package/src/examples/swap-anything.contract.d.ts.map +1 -0
  47. package/src/examples/swap-anything.flows.d.ts +32 -0
  48. package/src/examples/swap-anything.flows.d.ts.map +1 -0
  49. package/src/examples/swap.contract.d.ts +56 -0
  50. package/src/examples/swap.contract.d.ts.map +1 -0
  51. package/src/examples/swap.flows.d.ts +12 -0
  52. package/src/examples/swap.flows.d.ts.map +1 -0
  53. package/src/examples/unbond.contract.d.ts +21 -0
  54. package/src/examples/unbond.contract.d.ts.map +1 -0
  55. package/src/examples/unbond.flows.d.ts +6 -0
  56. package/src/examples/unbond.flows.d.ts.map +1 -0
  57. package/src/exos/chain-hub-admin.d.ts +27 -0
  58. package/src/exos/chain-hub-admin.d.ts.map +1 -0
  59. package/src/exos/chain-hub.d.ts +225 -0
  60. package/src/exos/chain-hub.d.ts.map +1 -0
  61. package/src/exos/combine-invitation-makers.d.ts +7 -0
  62. package/src/exos/combine-invitation-makers.d.ts.map +1 -0
  63. package/src/exos/cosmos-interchain-service.d.ts +49 -0
  64. package/src/exos/cosmos-interchain-service.d.ts.map +1 -0
  65. package/src/exos/cosmos-orchestration-account.d.ts +950 -0
  66. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
  67. package/src/exos/exo-interfaces.d.ts +27 -0
  68. package/src/exos/exo-interfaces.d.ts.map +1 -0
  69. package/src/exos/ibc-packet.d.ts +101 -0
  70. package/src/exos/ibc-packet.d.ts.map +1 -0
  71. package/src/exos/ica-account-kit.d.ts +98 -0
  72. package/src/exos/ica-account-kit.d.ts.map +1 -0
  73. package/src/exos/icq-connection-kit.d.ts +67 -0
  74. package/src/exos/icq-connection-kit.d.ts.map +1 -0
  75. package/src/exos/local-chain-facade.d.ts +1587 -0
  76. package/src/exos/local-chain-facade.d.ts.map +1 -0
  77. package/src/exos/local-orchestration-account.d.ts +405 -0
  78. package/src/exos/local-orchestration-account.d.ts.map +1 -0
  79. package/src/exos/orchestrator.d.ts +35857 -0
  80. package/src/exos/orchestrator.d.ts.map +1 -0
  81. package/src/exos/packet-tools.d.ts +63 -0
  82. package/src/exos/packet-tools.d.ts.map +1 -0
  83. package/src/exos/portfolio-holder-kit.d.ts +154 -0
  84. package/src/exos/portfolio-holder-kit.d.ts.map +1 -0
  85. package/src/exos/remote-chain-facade.d.ts +1549 -0
  86. package/src/exos/remote-chain-facade.d.ts.map +1 -0
  87. package/src/facade.d.ts +33 -0
  88. package/src/facade.d.ts.map +1 -0
  89. package/src/fetched-chain-info.d.ts +10275 -0
  90. package/src/fetched-chain-info.d.ts.map +1 -0
  91. package/src/fixtures/query-flows.contract.d.ts +33 -0
  92. package/src/fixtures/query-flows.contract.d.ts.map +1 -0
  93. package/src/fixtures/query-flows.flows.d.ts +20 -0
  94. package/src/fixtures/query-flows.flows.d.ts.map +1 -0
  95. package/src/orchestration-api.d.ts +315 -0
  96. package/src/orchestration-api.d.ts.map +1 -0
  97. package/src/typeGuards.d.ts +163 -0
  98. package/src/typeGuards.d.ts.map +1 -0
  99. package/src/types.d.ts +25 -0
  100. package/src/types.d.ts.map +1 -0
  101. package/src/utils/abitype.d.ts +6 -0
  102. package/src/utils/abitype.d.ts.map +1 -0
  103. package/src/utils/address.d.ts +44 -0
  104. package/src/utils/address.d.ts.map +1 -0
  105. package/src/utils/agd-lib.d.ts +58 -0
  106. package/src/utils/agd-lib.d.ts.map +1 -0
  107. package/src/utils/amounts.d.ts +11 -0
  108. package/src/utils/amounts.d.ts.map +1 -0
  109. package/src/utils/asset.d.ts +6 -0
  110. package/src/utils/asset.d.ts.map +1 -0
  111. package/src/utils/axelar-static-config.d.ts +34 -0
  112. package/src/utils/axelar-static-config.d.ts.map +1 -0
  113. package/src/utils/chain-hub-helper.d.ts +14 -0
  114. package/src/utils/chain-hub-helper.d.ts.map +1 -0
  115. package/src/utils/chain-info.d.ts +5 -0
  116. package/src/utils/chain-info.d.ts.map +1 -0
  117. package/src/utils/codecs.d.ts +145 -0
  118. package/src/utils/codecs.d.ts.map +1 -0
  119. package/src/utils/cosmos.d.ts +61 -0
  120. package/src/utils/cosmos.d.ts.map +1 -0
  121. package/src/utils/denomHash.d.ts +7 -0
  122. package/src/utils/denomHash.d.ts.map +1 -0
  123. package/src/utils/exo-helpers.d.ts +156 -0
  124. package/src/utils/exo-helpers.d.ts.map +1 -0
  125. package/src/utils/gmp.d.ts +30 -0
  126. package/src/utils/gmp.d.ts.map +1 -0
  127. package/src/utils/orc.d.ts +17 -0
  128. package/src/utils/orc.d.ts.map +1 -0
  129. package/src/utils/orchestrationAccount.d.ts +91 -0
  130. package/src/utils/orchestrationAccount.d.ts.map +1 -0
  131. package/src/utils/packet.d.ts +57 -0
  132. package/src/utils/packet.d.ts.map +1 -0
  133. package/src/utils/permit2/signatureTransfer.d.ts +221 -0
  134. package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
  135. package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
  136. package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
  137. package/src/utils/permit2.d.ts +11 -0
  138. package/src/utils/permit2.d.ts.map +1 -0
  139. package/src/utils/progress.d.ts +41 -0
  140. package/src/utils/progress.d.ts.map +1 -0
  141. package/src/utils/registry.d.ts +6 -0
  142. package/src/utils/registry.d.ts.map +1 -0
  143. package/src/utils/start-helper.d.ts +129 -0
  144. package/src/utils/start-helper.d.ts.map +1 -0
  145. package/src/utils/time.d.ts +38 -0
  146. package/src/utils/time.d.ts.map +1 -0
  147. package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
  148. package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
  149. package/src/utils/viem-utils/types.d.ts +6 -0
  150. package/src/utils/viem-utils/types.d.ts.map +1 -0
  151. package/src/utils/viem.d.ts +11 -0
  152. package/src/utils/viem.d.ts.map +1 -0
  153. package/src/utils/zcf-tools.d.ts +19 -0
  154. package/src/utils/zcf-tools.d.ts.map +1 -0
  155. package/src/utils/zoe-tools.d.ts +19 -0
  156. package/src/utils/zoe-tools.d.ts.map +1 -0
  157. package/src/vat-orchestration.d.ts +21 -0
  158. package/src/vat-orchestration.d.ts.map +1 -0
  159. package/tools/contract-tests.d.ts +1832 -0
  160. package/tools/contract-tests.d.ts.map +1 -0
  161. package/tools/ibc-mock-fixtures.d.ts +49 -0
  162. package/tools/ibc-mock-fixtures.d.ts.map +1 -0
  163. package/tools/ibc-mocks.d.ts +168 -0
  164. package/tools/ibc-mocks.d.ts.map +1 -0
  165. package/tools/make-test-address.d.ts +3 -0
  166. package/tools/make-test-address.d.ts.map +1 -0
  167. package/tools/network-fakes.d.ts +143 -0
  168. package/tools/network-fakes.d.ts.map +1 -0
  169. package/tools/protobuf-decoder.d.ts +19 -0
  170. package/tools/protobuf-decoder.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":";;;6BA2BU,CAAC,OAAO,cAAc,EAAE,MAAM,OAAO,cAAc,CAAC;AAX9D;;;;;;GAMG;AAEH;;;;;GAKG;AACH;;;;GAIG;AAsBI,sDALI,KAAK,SAAS,CAAC,QACf,MAAM,UACN,eAAe,EAAE,iBAS3B;AAYM,gDAPI,KAAK,SAAS,CAAC,QACf,MAAM,aACN,SAAS,QACT,CAAC,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE"}
@@ -0,0 +1,437 @@
1
+ import type { AnyJson, JsonSafe, MessageBody, ResponseTypeUrl, TypedJson, TypeFromUrl } from '@agoric/cosmic-proto';
2
+ import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
3
+ import type { RedelegationResponse, UnbondingDelegation } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
4
+ import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
5
+ import type { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
6
+ import type { RequestQuery, ResponseQuery } from '@agoric/cosmic-proto/tendermint/abci/types.js';
7
+ import type { Amount, Payment } from '@agoric/ertp/src/types.js';
8
+ import type { Port } from '@agoric/network';
9
+ import type { IBCChannelID, IBCConnectionInfo, IBCPortID, LocalIbcAddress, RemoteIbcAddress } from '@agoric/network/ibc';
10
+ import type { NetworkBinding, NetworkEndpoint } from '@agoric/vats';
11
+ import type { TargetApp, TargetRegistration } from '@agoric/vats/src/bridge-target.js';
12
+ import type { PFM_RECEIVER } from './exos/chain-hub.js';
13
+ import type { AccountId, AmountArg, BaseChainInfo, CosmosChainAddress, Denom, DenomAmount, PacketOptions } from './types.js';
14
+ /**
15
+ * Record of Network API traffic for a specific data packet sent between two
16
+ * chains.
17
+ */
18
+ export type TrafficEntry<
19
+ /** Source Protocol (like 'ibc') */
20
+ SP extends keyof NetworkBinding = keyof NetworkBinding,
21
+ /** Destination Protocol */
22
+ DP extends keyof NetworkBinding = SP> = {
23
+ /** Semantic operation name for debugging, e.g. 'IBC transfer' */
24
+ op: string;
25
+ /** Indicates whether the traffic entry is not yet finalized. */
26
+ incomplete?: boolean;
27
+ /** Network API endpoint info for source chain */
28
+ src: NetworkEndpoint<SP>;
29
+ /** Network API endpoint info for destination chain */
30
+ dst: NetworkEndpoint<DP>;
31
+ /** Sequence number to match sent packet to received acknowledgement */
32
+ seq: {
33
+ status: 'pending' | 'unknown';
34
+ } | number | bigint | string;
35
+ };
36
+ export type CosmosActionOptions = PacketOptions & {
37
+ txOpts?: Partial<Omit<TxBody, 'messages'>>;
38
+ };
39
+ /**
40
+ * The type of the `executeEncodedTx` options parameter on the underlying ICA.
41
+ */
42
+ export type LegacyExecuteEncodedTxOptions = CosmosActionOptions['txOpts'] & Omit<CosmosActionOptions, 'txOpts'>;
43
+ export type CosmosQuerierOptions = PacketOptions & {
44
+ queryOpts?: Partial<Omit<RequestQuery, 'path' | 'data'>>;
45
+ };
46
+ /**
47
+ * @example
48
+ *
49
+ * agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346
50
+ * cosmosvaloper1npm9gvss52mlmk
51
+ */
52
+ export type Bech32Address = `${string}1${string}`;
53
+ /** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */
54
+ export type CosmosValidatorAddress = CosmosChainAddress & {
55
+ value: `${string}valoper${string}`;
56
+ encoding: 'bech32';
57
+ };
58
+ export type { IBCConnectionInfo } from '@agoric/network/ibc';
59
+ /**
60
+ * https://github.com/cosmos/chain-registry/blob/master/assetlist.schema.json
61
+ */
62
+ export interface CosmosAssetInfo extends Record<string, unknown> {
63
+ base: Denom;
64
+ name: string;
65
+ display: string;
66
+ symbol: string;
67
+ denom_units: Array<{
68
+ denom: Denom;
69
+ exponent: number;
70
+ }>;
71
+ traces?: Array<{
72
+ type: 'ibc';
73
+ counterparty: {
74
+ chain_name: string;
75
+ base_denom: Denom;
76
+ channel_id: IBCChannelID;
77
+ };
78
+ chain: {
79
+ channel_id: IBCChannelID;
80
+ path: string;
81
+ };
82
+ }>;
83
+ }
84
+ /**
85
+ * Info for a Cosmos-based chain.
86
+ */
87
+ export interface CosmosChainInfo extends BaseChainInfo {
88
+ /** can be used to lookup chainInfo (chainId) from an address value */
89
+ bech32Prefix: string;
90
+ /** Cosmos chain ID. The CAIP-2 fields (namespace, reference) are on {@link BaseChainInfo}. */
91
+ chainId: string;
92
+ /** IBC connections between this chain and others, keyed by chainId */
93
+ connections?: Record<string, IBCConnectionInfo>;
94
+ /** indicates the host chain supports Interchain Accounts (ICS-27). Not currently used at runtime - only for types */
95
+ icaEnabled?: boolean;
96
+ /**
97
+ * indicates the host chain support the async-icq IBC Application protocol. Used at runtime to permit `Chain.query()` operations.
98
+ *
99
+ * in the future (@see https://github.com/Agoric/agoric-sdk/issues/9326), querying will be supported by the ICA protocol natively and this will likely deprecate
100
+ */
101
+ icqEnabled?: boolean;
102
+ namespace: 'cosmos';
103
+ /**
104
+ * Note: developers must provide this value themselves for `.transfer` to work
105
+ * as expected. Please see examples for details.
106
+ */
107
+ pfmEnabled?: boolean;
108
+ /**
109
+ * cf https://github.com/cosmos/chain-registry/blob/master/chain.schema.json#L117
110
+ */
111
+ stakingTokens?: Readonly<Array<{
112
+ denom: string;
113
+ }>>;
114
+ }
115
+ /** @see {QueryDelegationTotalRewardsResponse} */
116
+ export interface CosmosRewardsResponse {
117
+ rewards: {
118
+ validator: CosmosValidatorAddress;
119
+ reward: DenomAmount[];
120
+ }[];
121
+ total: DenomAmount[];
122
+ }
123
+ /** @see {DelegationResponse} */
124
+ export interface CosmosDelegationResponse {
125
+ delegator: CosmosChainAddress;
126
+ validator: CosmosValidatorAddress;
127
+ amount: DenomAmount;
128
+ }
129
+ /**
130
+ * Queries for the staking properties of an account.
131
+ *
132
+ * @see {@link https://docs.cosmos.network/main/build/modules/staking#messages x/staking messages}
133
+ * {@link https://cosmos.github.io/cosmjs/latest/stargate/interfaces/StakingExtension.html StakingExtension} in cosmjs
134
+ */
135
+ export interface StakingAccountQueries {
136
+ /**
137
+ * @returns all active delegations from the account to any validator (or [] if none)
138
+ */
139
+ getDelegations: (opts?: CosmosQuerierOptions) => Promise<CosmosDelegationResponse[]>;
140
+ /**
141
+ * @returns the active delegation from the account to a specific validator. Return an
142
+ * empty Delegation if there is no delegation.
143
+ */
144
+ getDelegation: (validator: CosmosValidatorAddress, opts?: CosmosQuerierOptions) => Promise<CosmosDelegationResponse>;
145
+ /**
146
+ * @returns the unbonding delegations from the account to any validator (or [] if none)
147
+ */
148
+ getUnbondingDelegations: (opts?: CosmosQuerierOptions) => Promise<UnbondingDelegation[]>;
149
+ /**
150
+ * @returns the unbonding delegations from the account to a specific validator (or [] if none)
151
+ */
152
+ getUnbondingDelegation: (validator: CosmosValidatorAddress, opts?: CosmosQuerierOptions) => Promise<UnbondingDelegation>;
153
+ getRedelegations: (opts?: CosmosQuerierOptions) => Promise<RedelegationResponse[]>;
154
+ /**
155
+ * Get the pending rewards for the account.
156
+ * @returns the amounts of the account's rewards pending from all validators
157
+ */
158
+ getRewards: (opts?: CosmosQuerierOptions) => Promise<CosmosRewardsResponse>;
159
+ /**
160
+ * Get the rewards pending with a specific validator.
161
+ * @param validator - the validator address to query for
162
+ * @returns the amount of the account's rewards pending from a specific validator
163
+ */
164
+ getReward: (validator: CosmosValidatorAddress, opts?: CosmosQuerierOptions) => Promise<DenomAmount[]>;
165
+ }
166
+ /**
167
+ * Transactions for doing staking operations on an individual account.
168
+ *
169
+ * @see {@link https://docs.cosmos.network/main/build/modules/staking#messages x/staking messages} and
170
+ * {@link https://cosmos.github.io/cosmjs/latest/stargate/interfaces/StakingExtension.html StakingExtension} in cosmjs
171
+ */
172
+ export interface StakingAccountActions {
173
+ /**
174
+ * Delegate an amount to a validator. The promise settles when the delegation is complete.
175
+ * @param validator - the validator to delegate to
176
+ * @param amount - the amount to delegate
177
+ * @param [opts] - transaction submission options
178
+ * @returns unknown
179
+ */
180
+ delegate: (validator: CosmosValidatorAddress, amount: AmountArg, opts?: CosmosActionOptions) => Promise<unknown>;
181
+ /**
182
+ * Redelegate from one delegator to another.
183
+ * Settles when the redelegation is established, not 21 days later.
184
+ * @param srcValidator - the current validator for the delegation.
185
+ * @param dstValidator - the validator that will receive the delegation.
186
+ * @param amount - how much to redelegate.
187
+ * @param [opts] - transaction submission options
188
+ * @returns
189
+ */
190
+ redelegate: (srcValidator: CosmosValidatorAddress, dstValidator: CosmosValidatorAddress, amount: AmountArg, opts?: CosmosActionOptions) => Promise<unknown>;
191
+ /**
192
+ * Undelegate multiple delegations (concurrently). To delegate independently, pass an array with one item.
193
+ * Resolves when the undelegation is complete and the tokens are no longer bonded. Note it may take weeks.
194
+ * The unbonding time is padded by 10 minutes to account for clock skew.
195
+ * @param delegations - the delegation to undelegate
196
+ * @param [opts] - transaction submission options
197
+ */
198
+ undelegate: (delegations: {
199
+ amount: AmountArg;
200
+ delegator?: CosmosChainAddress;
201
+ validator: CosmosValidatorAddress;
202
+ }[], opts?: CosmosActionOptions) => Promise<unknown>;
203
+ /**
204
+ * Withdraw rewards from all validators. The promise settles when the rewards are withdrawn.
205
+ * @param [opts] - transaction submission options
206
+ * @returns The total amounts of rewards withdrawn
207
+ */
208
+ withdrawRewards: (opts?: CosmosActionOptions) => Promise<DenomAmount[]>;
209
+ /**
210
+ * Withdraw rewards from a specific validator. The promise settles when the rewards are withdrawn.
211
+ * @param validator - the validator to withdraw rewards from
212
+ * @param [opts] - transaction submission options
213
+ * @returns
214
+ */
215
+ withdrawReward: (validator: CosmosValidatorAddress, opts?: CosmosActionOptions) => Promise<DenomAmount[]>;
216
+ }
217
+ /**
218
+ * Low level methods from IcaAccount that we pass through to CosmosOrchestrationAccount
219
+ */
220
+ export interface IcaAccountBaseMethods {
221
+ /**
222
+ * Submit a transaction on behalf of the remote account for execution on the remote chain.
223
+ * @param msgs - records for the transaction
224
+ * @param [opts] - optional parameters for the Tx. use `opts.sendOpts.relativeTimeoutNs` to specify a timeout for the ICA tx packet
225
+ * @returns base64 protobuf responses for tryDecodeMessages
226
+ */
227
+ executeEncodedTx: (msgs: readonly AnyJson[], opts?: LegacyExecuteEncodedTxOptions) => Promise<string>;
228
+ /**
229
+ * Deactivates the ICA account by closing the ICA channel. The `Port` is
230
+ * persisted so holders can always call `.reactivate()` to re-establish a new
231
+ * channel with the same chain address.
232
+ * CAVEAT: Does not retrieve assets so they may be lost if left.
233
+ * @throws {Error} if connection is not available or already deactivated
234
+ */
235
+ deactivate: () => Promise<void>;
236
+ /**
237
+ * Reactivates the ICA account by re-establishing a new channel with the
238
+ * original Port and requested address.
239
+ * If a channel is closed for an unexpected reason, such as a packet timeout,
240
+ * an automatic attempt to reopen will be made and the holder should not need
241
+ * to call `.reactivate()`.
242
+ * @throws {Error} if connection is currently active
243
+ */
244
+ reactivate: () => Promise<void>;
245
+ }
246
+ /**
247
+ * Low level object that supports queries and operations for an account on a remote chain.
248
+ */
249
+ export interface IcaAccount extends IcaAccountBaseMethods {
250
+ /**
251
+ * @returns the address of the account on the remote chain
252
+ */
253
+ getAddress: () => CosmosChainAddress;
254
+ /**
255
+ * Submit a transaction on behalf of the remote account for execution on the remote chain.
256
+ * @param msgs - records for the transaction
257
+ * @returns acknowledgement
258
+ */
259
+ executeTx: (msgs: TypedJson[]) => Promise<string>;
260
+ /** @returns the address of the remote channel */
261
+ getRemoteAddress: () => RemoteIbcAddress;
262
+ /** @returns the address of the local channel */
263
+ getLocalAddress: () => LocalIbcAddress;
264
+ /** @returns the port the ICA channel is bound to */
265
+ getPort: () => Port;
266
+ }
267
+ /**
268
+ * ICA-related account methods exposed on the Cosmos Orchestration Account
269
+ * holder facet.
270
+ */
271
+ export interface IcaAccountMethods extends IcaAccountBaseMethods {
272
+ /**
273
+ * Submit a transaction on behalf of the remote account for execution on
274
+ * the remote chain, and decode the response.
275
+ *
276
+ * Set `relativeTimeoutNs` to provide a timeout for the IBC packet.
277
+ *
278
+ * `TxBody` fields like `timeoutHeight` and `memo` can be set, but these
279
+ * typically do not affect IBC app protocols like PFM, ICA.
280
+ *
281
+ * @param msgs - records for the transaction
282
+ * @param [opts] - optional parameters for the Tx. use `opts.sendOpts.relativeTimeoutNs` to specify a timeout for the ICA tx packet
283
+ * @returns decoded responses or Any if unknown
284
+ */
285
+ executeTxProto3: <TUS extends readonly (keyof TypeFromUrl | unknown)[]>(msgs: Readonly<{
286
+ [K in keyof TUS]: AnyJson<TUS[K]>;
287
+ }>, opts?: CosmosActionOptions) => Promise<{
288
+ [K in keyof TUS]: MessageBody<ResponseTypeUrl<TUS[K]>>;
289
+ }>;
290
+ /**
291
+ * Submit a transaction on behalf of the remote account for execution on
292
+ * the remote chain, but do not decode the response.
293
+ *
294
+ * Set `relativeTimeoutNs` to provide a timeout for the IBC packet.
295
+ *
296
+ * `TxBody` fields like `timeoutHeight` and `memo` can be set, but these
297
+ * typically do not affect IBC app protocols like PFM, ICA.
298
+ *
299
+ * @param msgs - records for the transaction
300
+ * @param [opts] - optional parameters for the Tx. use `opts.sendOpts.relativeTimeoutNs` to specify a timeout for the ICA tx packet
301
+ * @returns base64 protobuf responses for tryDecodeMessages
302
+ */
303
+ executeTxProto3Undecoded: (msgs: readonly AnyJson[], opts?: CosmosActionOptions) => Promise<string>;
304
+ }
305
+ /** Methods on chains that support Liquid Staking */
306
+ export interface LiquidStakingMethods {
307
+ liquidStake: (amount: AmountArg, opts?: CosmosActionOptions) => Promise<unknown>;
308
+ }
309
+ /**
310
+ * Noble is the gateway to transferring USDC among Cosmos chains. We can
311
+ * transfer funds from any cosmos account using depositForBurn().
312
+ */
313
+ export interface NobleMethods {
314
+ /** burn USDC on Noble and mint on a destination chain via CCTP */
315
+ depositForBurn: (mintRecipient: AccountId, amount: AmountArg,
316
+ /** if specified, only this account can call MsgReceive on the destination chain */
317
+ caller?: AccountId, opts?: CosmosActionOptions) => Promise<unknown>;
318
+ }
319
+ /** Methods supported only on Agoric chain accounts */
320
+ export interface LocalAccountMethods extends StakingAccountActions {
321
+ /** deposit payment (from zoe, for example) to the account */
322
+ deposit: (payment: Payment<'nat'>) => Promise<Amount<'nat'>>;
323
+ /** withdraw a Payment from the account */
324
+ withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
325
+ /**
326
+ * Register a handler that receives an event each time ICS-20 transfers are
327
+ * sent or received by the underlying account.
328
+ *
329
+ * Handler includes {@link VTransferIBCEvent} and
330
+ * {@link FungibleTokenPacketData} that can be used for application logic.
331
+ *
332
+ * Each account may be associated with at most one handler at a given time.
333
+ *
334
+ * Does not grant the handler the ability to intercept a transfer. For a
335
+ * blocking handler, aka 'IBC Hooks', leverage `registerActiveTap` from
336
+ * `transferMiddleware` directly.
337
+ *
338
+ * @param tap
339
+ */
340
+ monitorTransfers: (tap: TargetApp) => Promise<TargetRegistration>;
341
+ /**
342
+ * Parse an incoming transfer message and return its details.
343
+ */
344
+ parseInboundTransfer: (packet: Record<string, any>) => Promise<{
345
+ amount: DenomAmount;
346
+ fromAccount: string;
347
+ toAccount: string;
348
+ extra: Record<string, any>;
349
+ }>;
350
+ }
351
+ /**
352
+ * Options for {@link OrchestrationAccountI} `transfer` method.
353
+ *
354
+ * If specifying a custom timeout, use one of `timeoutHeight`, `timeoutTimestamp`, or `timeoutRelativeSeconds`.
355
+ *
356
+ * @see {@link https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures ICS 20 Data Structures}
357
+ */
358
+ export type IBCMsgTransferOptions = {
359
+ timeoutHeight?: MsgTransfer['timeoutHeight'];
360
+ timeoutTimestamp?: MsgTransfer['timeoutTimestamp'];
361
+ /** converted using {@link TimerService} to a `timeoutTimestamp` value `timeoutRelativeSeconds` in the future */
362
+ timeoutRelativeSeconds?: bigint;
363
+ memo?: string;
364
+ forwardOpts?: {
365
+ /** The recipient address for the intermediate transfer. Defaults to 'pfm' unless specified */
366
+ intermediateRecipient?: CosmosChainAddress;
367
+ timeout?: ForwardInfo['forward']['timeout'];
368
+ retries?: ForwardInfo['forward']['retries'];
369
+ };
370
+ } & CosmosActionOptions;
371
+ /**
372
+ * Cosmos-specific methods to extend `OrchestrationAccountI`, parameterized
373
+ * by `CosmosChainInfo`.
374
+ *
375
+ * In particular, if the chain info includes a staking token, {@link StakingAccountActions}
376
+ * are available.
377
+ *
378
+ * @see {OrchestrationAccountI}
379
+ */
380
+ export type CosmosChainAccountMethods<CCI extends {
381
+ chainId: string;
382
+ }> = IcaAccountMethods & (CCI extends {
383
+ stakingTokens: object;
384
+ } ? StakingAccountActions & StakingAccountQueries : object);
385
+ export type ICQQueryFunction = (msgs: JsonSafe<RequestQuery>[]) => Promise<JsonSafe<ResponseQuery>[]>;
386
+ /**
387
+ * Message structure for PFM memo
388
+ *
389
+ * @see {@link https://github.com/cosmos/chain-registry/blob/58b603bbe01f70e911e3ad2bdb6b90c4ca665735/_memo_keys/ICS20_memo_keys.json#L38-L60}
390
+ */
391
+ export interface ForwardInfo {
392
+ forward: {
393
+ receiver: CosmosChainAddress['value'];
394
+ port: IBCPortID;
395
+ channel: IBCChannelID;
396
+ /** e.g. '10m' */
397
+ timeout: GoDuration;
398
+ /** default is 3? */
399
+ retries: number;
400
+ next?: {
401
+ forward: ForwardInfo;
402
+ };
403
+ };
404
+ }
405
+ /**
406
+ * Object used to help build MsgTransfer parameters for IBC transfers.
407
+ *
408
+ * If `forwardInfo` is present:
409
+ * - it must be stringified and provided as the `memo` field value for
410
+ * use with `MsgTransfer`.
411
+ * - `receiver` will be set to `"pfm"` - purposely invalid bech32. see {@link https://github.com/cosmos/ibc-apps/blob/26f3ad8f58e4ffc7769c6766cb42b954181dc100/middleware/packet-forward-middleware/README.md#minimal-example---chain-forward-a-b-c}
412
+ */
413
+ export type TransferRoute = {
414
+ /** typically, `transfer` */
415
+ sourcePort: string;
416
+ sourceChannel: IBCChannelID;
417
+ token: Coin;
418
+ } & ({
419
+ receiver: typeof PFM_RECEIVER | CosmosChainAddress['value'];
420
+ /** contains PFM forwarding info */
421
+ forwardInfo: ForwardInfo;
422
+ } | {
423
+ receiver: string;
424
+ forwardInfo?: never;
425
+ });
426
+ /** Single units allowed in Go time duration strings */
427
+ type GoDurationUnit = 'h' | 'm' | 's' | 'ms' | 'us' | 'ns';
428
+ /**
429
+ * Type for a time duration string in Go (cosmos-sdk). For example, "1h", "3m".
430
+ *
431
+ * Note: this does not support composite values like "1h30m", "1m30s",
432
+ * which are allowed in Go.
433
+ *
434
+ * @see https://pkg.go.dev/time#ParseDuration
435
+ */
436
+ export type GoDuration = `${number}${GoDurationUnit}`;
437
+ //# sourceMappingURL=cosmos-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACT,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kDAAkD,CAAC;AAC7E,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAO3F,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACd,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEhB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,SAAS,EACT,k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CAAC;AAEF,uDAAuD;AACvD,KAAK,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,GAAG,cAAc,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ export {};
2
+ /**
3
+ * @file
4
+ *
5
+ * Placeholder for Ethereum/EVM specific APIs, like `EvmAccountMethods`.
6
+ *
7
+ * Currently, just EVM `ChainInfo` is represented in the API. @see {@link BaseChainInfo} and {@link ./cctp-chain-info.js}.
8
+ */
9
+ //# sourceMappingURL=ethereum-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ethereum-api.d.ts","sourceRoot":"","sources":["ethereum-api.ts"],"names":[],"mappings":";AAGA;;;;;;GAMG"}
@@ -0,0 +1,50 @@
1
+ export function prepareStakingTap(zone: Zone, vowTools: VowTools): (...args: Parameters<ReturnType<typeof prepareStakingTapKit>>) => ReturnType<ReturnType<typeof prepareStakingTapKit>>["tap"];
2
+ export type StakingTapState = {
3
+ stakingAccount: ERef<OrchestrationAccount<any> & StakingAccountActions>;
4
+ localAccount: ERef<OrchestrationAccount<{
5
+ chainId: "agoric-any";
6
+ }>>;
7
+ validator: CosmosValidatorAddress;
8
+ localChainAddress: CosmosChainAddress;
9
+ remoteChainAddress: CosmosChainAddress;
10
+ sourceChannel: IBCChannelID;
11
+ remoteDenom: Denom;
12
+ localDenom: Denom;
13
+ };
14
+ export type MakeStakingTap = ReturnType<typeof prepareStakingTap>;
15
+ export type StakingTap = ReturnType<MakeStakingTap>;
16
+ import type { Zone } from '@agoric/zone';
17
+ import type { VowTools } from '@agoric/vow';
18
+ /**
19
+ * @param {Zone} zone
20
+ * @param {VowTools} vowTools
21
+ */
22
+ declare function prepareStakingTapKit(zone: Zone, { watch }: VowTools): (initialState: StakingTapState) => import("@endo/exo").GuardedKit<{
23
+ tap: {
24
+ /**
25
+ * Transfers from localAccount to stakingAccount, then delegates from
26
+ * the stakingAccount to `validator` if the expected token (remoteDenom)
27
+ * is received.
28
+ *
29
+ * @param {VTransferIBCEvent} event
30
+ */
31
+ receiveUpcall(event: VTransferIBCEvent): import("@agoric/vow").Vow<unknown> | undefined;
32
+ };
33
+ transferWatcher: {
34
+ /**
35
+ * @param {any} _result
36
+ * @param {bigint} value the qty of uatom to delegate
37
+ */
38
+ onFulfilled(_result: any, value: bigint): import("@agoric/vow").Vow<unknown>;
39
+ };
40
+ }>;
41
+ import type { OrchestrationAccount } from '@agoric/orchestration';
42
+ import type { StakingAccountActions } from '@agoric/orchestration';
43
+ import type { ERef } from '@agoric/vow';
44
+ import type { CosmosValidatorAddress } from '@agoric/orchestration';
45
+ import type { CosmosChainAddress } from '@agoric/orchestration';
46
+ import type { IBCChannelID } from '@agoric/network/ibc';
47
+ import type { Denom } from '@agoric/orchestration';
48
+ import type { VTransferIBCEvent } from '@agoric/vats';
49
+ export {};
50
+ //# sourceMappingURL=auto-stake-it-tap-kit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-stake-it-tap-kit.d.ts","sourceRoot":"","sources":["auto-stake-it-tap-kit.js"],"names":[],"mappings":"AAmJO,wCANI,IAAI,YACJ,QAAQ,GACN,CACZ,GAAO,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,KACzD,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,CAKjE;8BAhIY;IACR,cAAc,EAAE,KAAK,qBAAqB,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;IACxE,YAAY,EAAE,KAAK,qBAAqB;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC,CAAC;IACpE,SAAS,EAAE,sBAAsB,CAAC;IAClC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,aAAa,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAE,KAAK,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC;CACnB;6BAyHU,UAAU,CAAC,OAAO,iBAAiB,CAAC;yBACpC,UAAU,CAAC,cAAc,CAAC;0BA5IjB,cAAc;8BADV,aAAa;AAmCxC;;;GAGG;AACH,4CAHW,IAAI,aACJ,QAAQ;;QAsBX;;;;;;WAMG;6BADQ,iBAAiB;;;QAqC5B;;;WAGG;6BAFQ,GAAG,SACH,MAAM;;GAcxB;0CAlHgH,uBAAuB;2CAAvB,uBAAuB;0BAGjH,aAAa;4CAH6E,uBAAuB;wCAAvB,uBAAuB;kCALzG,qBAAqB;2BAK6D,uBAAuB;uCAJpG,cAAc"}
@@ -0,0 +1,34 @@
1
+ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
2
+ marshaller: Remote<Marshaller>;
3
+ chainInfo?: Record<string, CosmosChainInfo>;
4
+ assetInfo?: [Denom, DenomDetail & {
5
+ brandKey?: string;
6
+ }][];
7
+ }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
8
+ publicFacet: import("@endo/exo").Guarded<{
9
+ makeAccountsInvitation(): Promise<import("@agoric/zoe").Invitation<import("@agoric/vow").Vow<import("@agoric/vow").Vow<{
10
+ publicSubscribers: {
11
+ [k: string]: import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>;
12
+ };
13
+ invitationMakers: import("@endo/exo").Guarded<{
14
+ Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<import("@agoric/zoe").Invitation<unknown, IA>>;
15
+ }>;
16
+ }>>, {
17
+ chainName: string;
18
+ validator: import("../cosmos-api.js").CosmosValidatorAddress;
19
+ }>>;
20
+ }>;
21
+ creatorFacet: import("@endo/exo").Guarded<{
22
+ registerChain(chainName: string, chainInfo: import("../orchestration-api.js").ChainInfo, ibcConnectionInfo?: import("../types.js").IBCConnectionInfo): Promise<void>;
23
+ registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
24
+ }>;
25
+ }>;
26
+ export type AutoStakeItSF = typeof start;
27
+ import type { ZCF } from '@agoric/zoe';
28
+ import type { OrchestrationPowers } from '../utils/start-helper.js';
29
+ import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
30
+ import type { Remote } from '@agoric/internal';
31
+ import type { CosmosChainInfo } from '../types.js';
32
+ import type { Denom } from '../types.js';
33
+ import type { DenomDetail } from '../types.js';
34
+ //# sourceMappingURL=auto-stake-it.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-stake-it.contract.d.ts","sourceRoot":"","sources":["auto-stake-it.contract.js"],"names":[],"mappings":"AAsFA;gBAzDiB,OAAO,UAAU,CAAC;gBAClB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;;;;;;;;;;;;GAuDgB;4BAGjE,OAAO,KAAK;yBAxEJ,aAAa;yCAFuB,0BAA0B;gCAGvD,0CAA0C;4BAL9C,kBAAkB;qCAGW,aAAa;2BAAb,aAAa;iCAAb,aAAa"}
@@ -0,0 +1,24 @@
1
+ export function makeAccounts(orch: Orchestrator, { makeStakingTap, makePortfolioHolder, chainHub }: {
2
+ makeStakingTap: MakeStakingTap;
3
+ makePortfolioHolder: MakePortfolioHolder;
4
+ chainHub: GuestInterface<ChainHub>;
5
+ }, seat: ZCFSeat, { chainName, validator }: {
6
+ chainName: string;
7
+ validator: CosmosValidatorAddress;
8
+ }): Promise<import("@agoric/vow").Vow<{
9
+ publicSubscribers: {
10
+ [k: string]: ResolvedPublicTopic<unknown>;
11
+ };
12
+ invitationMakers: import("@endo/exo").Guarded<{
13
+ Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<import("@agoric/zoe").Invitation<unknown, IA>>;
14
+ }>;
15
+ }>>;
16
+ import type { Orchestrator } from '@agoric/orchestration';
17
+ import type { MakeStakingTap } from './auto-stake-it-tap-kit.js';
18
+ import type { MakePortfolioHolder } from '../exos/portfolio-holder-kit.js';
19
+ import type { ChainHub } from '../exos/chain-hub.js';
20
+ import type { GuestInterface } from '@agoric/async-flow';
21
+ import type { ZCFSeat } from '@agoric/zoe';
22
+ import type { CosmosValidatorAddress } from '@agoric/orchestration';
23
+ import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
24
+ //# sourceMappingURL=auto-stake-it.flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-stake-it.flows.d.ts","sourceRoot":"","sources":["auto-stake-it.flows.js"],"names":[],"mappings":"AA2BO,mCAZI,YAAY,qDACZ;IACN,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,QAAQ,EAAE,eAAe,QAAQ,CAAC,CAAC;CACpC,QACO,OAAO,4BACP;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,sBAAsB,CAAC;CACnC;;;;;;;IA4EH;kCA/FsJ,uBAAuB;oCAC7I,4BAA4B;yCACvB,iCAAiC;8BAC5C,sBAAsB;oCAJhB,oBAAoB;6BAK3B,aAAa;4CAJgH,uBAAuB;yCAFxI,2CAA2C"}