@agoric/orchestration 0.1.1-dev-90906b1.0 → 0.1.1-dev-4202f3e.0

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 (38) hide show
  1. package/package.json +15 -15
  2. package/src/cosmos-api.d.ts +38 -17
  3. package/src/cosmos-api.d.ts.map +1 -1
  4. package/src/cosmos-api.ts +40 -14
  5. package/src/examples/stakeAtom.contract.d.ts.map +1 -1
  6. package/src/examples/stakeAtom.contract.js +9 -6
  7. package/src/examples/stakeBld.contract.d.ts +66 -6
  8. package/src/examples/stakeBld.contract.d.ts.map +1 -1
  9. package/src/examples/stakeBld.contract.js +80 -39
  10. package/src/examples/swapExample.contract.d.ts.map +1 -1
  11. package/src/examples/swapExample.contract.js +1 -0
  12. package/src/exos/chainAccountKit.d.ts.map +1 -1
  13. package/src/exos/chainAccountKit.js +0 -1
  14. package/src/exos/local-chain-account-kit.d.ts +97 -0
  15. package/src/exos/local-chain-account-kit.d.ts.map +1 -0
  16. package/src/exos/local-chain-account-kit.js +253 -0
  17. package/src/facade.d.ts +1 -1
  18. package/src/facade.d.ts.map +1 -1
  19. package/src/facade.js +1 -1
  20. package/src/orchestration-api.d.ts +5 -5
  21. package/src/orchestration-api.d.ts.map +1 -1
  22. package/src/orchestration-api.ts +5 -5
  23. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  24. package/src/proposals/start-stakeBld.d.ts +92 -10
  25. package/src/proposals/start-stakeBld.d.ts.map +1 -1
  26. package/src/proposals/start-stakeBld.js +16 -3
  27. package/src/typeGuards.d.ts +1 -0
  28. package/src/typeGuards.d.ts.map +1 -1
  29. package/src/typeGuards.js +12 -1
  30. package/src/utils/mockChainInfo.d.ts +4 -0
  31. package/src/utils/mockChainInfo.d.ts.map +1 -0
  32. package/src/utils/mockChainInfo.js +86 -0
  33. package/src/utils/time.d.ts +25 -0
  34. package/src/utils/time.d.ts.map +1 -0
  35. package/src/utils/time.js +38 -0
  36. package/src/exos/localchainAccountKit.d.ts +0 -62
  37. package/src/exos/localchainAccountKit.d.ts.map +0 -1
  38. package/src/exos/localchainAccountKit.js +0 -155
@@ -0,0 +1,97 @@
1
+ export function prepareLocalChainAccountKit(baggage: Baggage, makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => RecorderKit<T>, zcf: ZCF, timerService: TimerService, timerBrand: TimerBrand, agoricChainInfo: AgoricChainInfo): (args_0: {
2
+ account: import("@endo/exo").Guarded<{
3
+ getAddress(): Promise<string>;
4
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
5
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
6
+ executeTx<MT extends {
7
+ '@type': string;
8
+ }[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
9
+ }>;
10
+ address: string;
11
+ storageNode: StorageNode;
12
+ }) => import("@endo/exo").GuardedKit<{
13
+ helper: {
14
+ /** @throws if this holder no longer owns the account */
15
+ owned(): import("@endo/exo").Guarded<{
16
+ getAddress(): Promise<string>;
17
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
18
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
19
+ executeTx<MT extends {
20
+ '@type': string;
21
+ }[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
22
+ }>;
23
+ getUpdater(): import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<LocalChainAccountNotification>;
24
+ };
25
+ invitationMakers: {
26
+ Delegate(validatorAddress: any, amount: any): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
27
+ '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
28
+ }, undefined>>;
29
+ CloseAccount(): never;
30
+ TransferAccount(): never;
31
+ };
32
+ holder: {
33
+ getPublicTopics(): {
34
+ account: {
35
+ description: string;
36
+ subscriber: globalThis.Subscriber<LocalChainAccountNotification>;
37
+ storagePath: Promise<string>;
38
+ };
39
+ };
40
+ /**
41
+ *
42
+ * @param {string} validatorAddress
43
+ * @param {Amount<'nat'>} ertpAmount
44
+ */
45
+ makeDelegateInvitation(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
46
+ '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
47
+ }, undefined>>;
48
+ makeCloseAccountInvitation(): never;
49
+ /**
50
+ * Starting a transfer revokes the account holder. The associated updater
51
+ * will get a special notification that the account is being transferred.
52
+ */
53
+ makeTransferAccountInvitation(): never;
54
+ /** @type {LocalChainAccount['deposit']} */
55
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
56
+ /** @type {LocalChainAccount['withdraw']} */
57
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
58
+ /**
59
+ * @returns {ChainAddress['address']}
60
+ */
61
+ getAddress(): string;
62
+ /**
63
+ * @param {AmountArg} amount an ERTP {@link Amount} or a {@link DenomAmount}
64
+ * @param {ChainAddress} destination
65
+ * @param {IBCMsgTransferOptions} [opts] if either timeoutHeight or timeoutTimestamp are not supplied, a default timeoutTimestamp will be set for 5 minutes in the future
66
+ * @returns {Promise<void>}
67
+ */
68
+ transfer(amount: AmountArg, destination: ChainAddress, opts?: IBCMsgTransferOptions | undefined): Promise<void>;
69
+ };
70
+ }>;
71
+ export type AgoricChainInfo = {
72
+ connections: globalThis.MapStore<string, import("@agoric/orchestration").IBCConnectionInfo>;
73
+ };
74
+ export type LocalChainAccountNotification = {
75
+ address: string;
76
+ };
77
+ export type State = {
78
+ topicKit: RecorderKit<LocalChainAccountNotification>;
79
+ account: import("@endo/exo").Guarded<{
80
+ getAddress(): Promise<string>;
81
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
82
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
83
+ executeTx<MT extends {
84
+ '@type': string;
85
+ }[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
86
+ }> | null;
87
+ address: string;
88
+ };
89
+ export type LocalChainAccountKit = ReturnType<ReturnType<typeof prepareLocalChainAccountKit>>;
90
+ import type { Baggage } from '@agoric/vat-data';
91
+ import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
92
+ import type { TimerService } from '@agoric/time';
93
+ import type { TimerBrand } from '@agoric/time';
94
+ import type { AmountArg } from '@agoric/orchestration';
95
+ import type { ChainAddress } from '@agoric/orchestration';
96
+ import type { IBCMsgTransferOptions } from '@agoric/orchestration';
97
+ //# sourceMappingURL=local-chain-account-kit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-chain-account-kit.d.ts","sourceRoot":"","sources":["local-chain-account-kit.js"],"names":[],"mappings":"AAsEO,gGAwEqB,WAAW,GAAE,QAAS,OAAO,WACpD,EAAO,MAAC,CACH,WAAA,CAAC,CAAC,0HA/ED,GAAG,uEAGH,eAAe;;;yBAtBxB,QAAK,KAAK,CAAC,mBAA2B,OAAO;yBAYjC,OAAQ,KACpB,CAAC;;;uBAqBQ,EACX;;;iBAee,WAAW;;;QAalB,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;QAqCxD;;;;WAIG;iDAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;;QAgCxB;;;WAGG;;QAIH,2CAA2C;yBA9IjD,QAAK,KAAK,CAAC,mBAA2B,OAAO;QAkJvC,4CAA4C;yBAtItC,OAAQ,KACpB,CAAC;QAyIK;;WAEG;;QAIH;;;;;WAKG;0GADU,OAAO,CAAC,IAAI,CAAC;;GA6CjC;;;;;aA1Na,MAAM;;;;;;yBAalB,QAAK,KAAK,CAAC,mBAA2B,OAAO;yBAYjC,OAAQ,KACpB,CAAC;;;uBAqBQ,EACX;;;;mCA2Kc,UAAU,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;6BAxO9C,kBAAkB;iCADG,6CAA6C;kCAEjD,cAAc;gCAAd,cAAc;+BAHsC,uBAAuB;kCAAvB,uBAAuB;2CAAvB,uBAAuB"}
@@ -0,0 +1,253 @@
1
+ /** @file Use-object for the owner of a localchain account */
2
+ import { NonNullish } from '@agoric/assert';
3
+ import { typedJson } from '@agoric/cosmic-proto/vatsafe';
4
+ import { AmountShape, PaymentShape } from '@agoric/ertp';
5
+ import { makeTracer } from '@agoric/internal';
6
+ import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
7
+ import { M, prepareExoClassKit } from '@agoric/vat-data';
8
+ import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
9
+ import { E } from '@endo/far';
10
+ import {
11
+ AmountArgShape,
12
+ ChainAddressShape,
13
+ IBCTransferOptionsShape,
14
+ } from '../typeGuards.js';
15
+ import { makeTimestampHelper } from '../utils/time.js';
16
+
17
+ /**
18
+ * @import {LocalChainAccount} from '@agoric/vats/src/localchain.js';
19
+ * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, CosmosChainInfo} from '@agoric/orchestration';
20
+ * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
21
+ * @import {Baggage} from '@agoric/vat-data';
22
+ * @import {TimerService, TimerBrand} from '@agoric/time';
23
+ * @import {TimestampHelper} from '../utils/time.js';
24
+ */
25
+
26
+ // partial until #8879
27
+ /** @typedef {Pick<CosmosChainInfo, 'connections'>} AgoricChainInfo */
28
+
29
+ const trace = makeTracer('LCAH');
30
+
31
+ const { Fail } = assert;
32
+ /**
33
+ * @typedef {object} LocalChainAccountNotification
34
+ * @property {string} address
35
+ */
36
+
37
+ /**
38
+ * @typedef {{
39
+ * topicKit: RecorderKit<LocalChainAccountNotification>;
40
+ * account: LocalChainAccount | null;
41
+ * address: ChainAddress['address'];
42
+ * }} State
43
+ */
44
+
45
+ const HolderI = M.interface('holder', {
46
+ getPublicTopics: M.call().returns(TopicsRecordShape),
47
+ makeDelegateInvitation: M.call(M.string(), AmountShape).returns(M.promise()),
48
+ makeCloseAccountInvitation: M.call().returns(M.promise()),
49
+ makeTransferAccountInvitation: M.call().returns(M.promise()),
50
+ deposit: M.callWhen(PaymentShape).returns(AmountShape),
51
+ withdraw: M.callWhen(AmountShape).returns(PaymentShape),
52
+ transfer: M.call(AmountArgShape, ChainAddressShape)
53
+ .optional(IBCTransferOptionsShape)
54
+ .returns(M.promise()),
55
+ getAddress: M.call().returns(M.string()),
56
+ });
57
+
58
+ /** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
59
+ const PUBLIC_TOPICS = {
60
+ account: ['Account holder status', M.any()],
61
+ };
62
+
63
+ /**
64
+ * @param {Baggage} baggage
65
+ * @param {MakeRecorderKit} makeRecorderKit
66
+ * @param {ZCF} zcf
67
+ * @param {TimerService} timerService
68
+ * @param {TimerBrand} timerBrand
69
+ * @param {AgoricChainInfo} agoricChainInfo
70
+ */
71
+ export const prepareLocalChainAccountKit = (
72
+ baggage,
73
+ makeRecorderKit,
74
+ zcf,
75
+ timerService,
76
+ timerBrand,
77
+ agoricChainInfo,
78
+ ) => {
79
+ const timestampHelper = makeTimestampHelper(timerService, timerBrand);
80
+ const makeAccountHolderKit = prepareExoClassKit(
81
+ baggage,
82
+ 'Account Holder',
83
+ {
84
+ helper: UnguardedHelperI,
85
+ holder: HolderI,
86
+ invitationMakers: M.interface('invitationMakers', {
87
+ Delegate: HolderI.payload.methodGuards.makeDelegateInvitation,
88
+ CloseAccount: HolderI.payload.methodGuards.makeCloseAccountInvitation,
89
+ TransferAccount:
90
+ HolderI.payload.methodGuards.makeTransferAccountInvitation,
91
+ }),
92
+ },
93
+ /**
94
+ * @param {object} initState
95
+ * @param {LocalChainAccount} initState.account
96
+ * @param {ChainAddress['address']} initState.address
97
+ * @param {StorageNode} initState.storageNode
98
+ * @returns {State}
99
+ */
100
+ ({ account, address, storageNode }) => {
101
+ // must be the fully synchronous maker because the kit is held in durable state
102
+ // @ts-expect-error XXX Patterns
103
+ const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
104
+
105
+ // #9162 use ChainAddress object instead of `address` string
106
+ return { account, address, topicKit };
107
+ },
108
+ {
109
+ helper: {
110
+ /** @throws if this holder no longer owns the account */
111
+ owned() {
112
+ const { account } = this.state;
113
+ if (!account) {
114
+ throw Fail`Using account holder after transfer`;
115
+ }
116
+ return account;
117
+ },
118
+ getUpdater() {
119
+ return this.state.topicKit.recorder;
120
+ },
121
+ },
122
+ invitationMakers: {
123
+ Delegate(validatorAddress, amount) {
124
+ return this.facets.holder.makeDelegateInvitation(
125
+ validatorAddress,
126
+ amount,
127
+ );
128
+ },
129
+ CloseAccount() {
130
+ return this.facets.holder.makeCloseAccountInvitation();
131
+ },
132
+ TransferAccount() {
133
+ return this.facets.holder.makeTransferAccountInvitation();
134
+ },
135
+ },
136
+ holder: {
137
+ getPublicTopics() {
138
+ const { topicKit } = this.state;
139
+ return harden({
140
+ account: {
141
+ description: PUBLIC_TOPICS.account[0],
142
+ subscriber: topicKit.subscriber,
143
+ storagePath: topicKit.recorder.getStoragePath(),
144
+ },
145
+ });
146
+ },
147
+ /**
148
+ *
149
+ * @param {string} validatorAddress
150
+ * @param {Amount<'nat'>} ertpAmount
151
+ */
152
+ async makeDelegateInvitation(validatorAddress, ertpAmount) {
153
+ trace('makeDelegateInvitation', validatorAddress, ertpAmount);
154
+
155
+ // TODO #9211 lookup denom from brand
156
+ const amount = {
157
+ amount: String(ertpAmount.value),
158
+ denom: 'ubld',
159
+ };
160
+
161
+ return zcf.makeInvitation(async seat => {
162
+ // TODO should it allow delegating more BLD?
163
+ seat.exit();
164
+ const lca = this.facets.helper.owned();
165
+ trace('lca', lca);
166
+ const delegatorAddress = await E(lca).getAddress();
167
+ trace('delegatorAddress', delegatorAddress);
168
+ const [result] = await E(lca).executeTx([
169
+ typedJson('/cosmos.staking.v1beta1.MsgDelegate', {
170
+ amount,
171
+ validatorAddress,
172
+ delegatorAddress,
173
+ }),
174
+ ]);
175
+ trace('got result', result);
176
+ return result;
177
+ }, 'Delegate');
178
+ },
179
+ makeCloseAccountInvitation() {
180
+ throw Error('not yet implemented');
181
+ },
182
+ /**
183
+ * Starting a transfer revokes the account holder. The associated updater
184
+ * will get a special notification that the account is being transferred.
185
+ */
186
+ makeTransferAccountInvitation() {
187
+ throw Error('not yet implemented');
188
+ },
189
+ /** @type {LocalChainAccount['deposit']} */
190
+ async deposit(payment, optAmountShape) {
191
+ return E(this.facets.helper.owned()).deposit(payment, optAmountShape);
192
+ },
193
+ /** @type {LocalChainAccount['withdraw']} */
194
+ async withdraw(amount) {
195
+ return E(this.facets.helper.owned()).withdraw(amount);
196
+ },
197
+ /**
198
+ * @returns {ChainAddress['address']}
199
+ */
200
+ getAddress() {
201
+ return NonNullish(this.state.address, 'Chain address not available.');
202
+ },
203
+ /**
204
+ * @param {AmountArg} amount an ERTP {@link Amount} or a {@link DenomAmount}
205
+ * @param {ChainAddress} destination
206
+ * @param {IBCMsgTransferOptions} [opts] if either timeoutHeight or timeoutTimestamp are not supplied, a default timeoutTimestamp will be set for 5 minutes in the future
207
+ * @returns {Promise<void>}
208
+ */
209
+ async transfer(amount, destination, opts) {
210
+ trace('Transferring funds from LCA over IBC');
211
+ // TODO #9211 lookup denom from brand
212
+ if ('brand' in amount) throw Fail`ERTP Amounts not yet supported`;
213
+
214
+ // TODO #8879 chainInfo and #9063 well-known chains
215
+ const { transferChannel } = agoricChainInfo.connections.get(
216
+ destination.chainId,
217
+ );
218
+
219
+ await null;
220
+ // set a `timeoutTimestamp` if caller does not supply either `timeoutHeight` or `timeoutTimestamp`
221
+ // TODO #9324 what's a reasonable default? currently 5 minutes
222
+ const timeoutTimestamp =
223
+ opts?.timeoutTimestamp ??
224
+ (opts?.timeoutHeight
225
+ ? 0n
226
+ : await timestampHelper.getTimeoutTimestampNS());
227
+
228
+ const [result] = await E(this.facets.helper.owned()).executeTx([
229
+ typedJson('/ibc.applications.transfer.v1.MsgTransfer', {
230
+ sourcePort: transferChannel.portId,
231
+ sourceChannel: transferChannel.channelId,
232
+ token: {
233
+ amount: String(amount.value),
234
+ denom: amount.denom,
235
+ },
236
+ sender: this.state.address,
237
+ receiver: destination.address,
238
+ timeoutHeight: opts?.timeoutHeight ?? {
239
+ revisionHeight: 0n,
240
+ revisionNumber: 0n,
241
+ },
242
+ timeoutTimestamp,
243
+ memo: opts?.memo ?? '',
244
+ }),
245
+ ]);
246
+ trace('MsgTransfer result', result);
247
+ },
248
+ },
249
+ },
250
+ );
251
+ return makeAccountHolderKit;
252
+ };
253
+ /** @typedef {ReturnType<ReturnType<typeof prepareLocalChainAccountKit>>} LocalChainAccountKit */
package/src/facade.d.ts CHANGED
@@ -14,7 +14,7 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
14
14
  localchain: ERef<import("@endo/exo").Guarded<{
15
15
  makeAccount(): Promise<import("@endo/exo").Guarded<{
16
16
  getAddress(): Promise<string>;
17
- deposit(payment: Payment<"nat">, optAmountShape?: Pattern /** @returns {Promise<OrchestrationAccount<C>>} */): Promise<globalThis.Amount>;
17
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
18
18
  withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
19
19
  executeTx<MT extends {
20
20
  '@type': string;
@@ -1 +1 @@
1
- {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAgJO;;;SANG,GAAG;;;;;;;;;;;;;6BAzEsB,QAC/B,KAAG,CAAC,mBAA2B,OAC/B,CAAA,kDAAkD;6BAgBxC,OAAO,KAAK,CAAC;;;2BAkBnB,EAAF;;uBAmFkC,OAAO,sBAG7C,EACD,SAAS;;;4BAEujB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;IA7BvmB;;;;;;;OAOG;gBAFkC,OAAO,EACrB,IAAI,6BAHhB,MAAM,OAEoB,OAAO,AAD1B,gCACmB,OAAO,WACrB,IAAI,AADgC,KAAK,MAAM,GACzD,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC;EAoBnD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAxLjC,cAAc;kCACN,cAAc;0BAEtB,WAAW;kCAEqC,YAAY"}
1
+ {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAgJO;;;SANG,GAAG;;;;;;;;;;;;;6BAxET,QAAI,KAAK,CAAC,mBAEV,OADM;6BAgBW,OAAM,KAAK,CAAC;;;2BAkBvB,EAAE;;uBAmFkC,OAAO,sBAIhD,EAAE,SAAS;;;4BAEujB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;IA7B7mB;;;;;;;OAOG;gBAFkC,OAAO,EACrB,IAAI,6BAHhB,MAAM,OAEoB,OAAO,AAD1B,gCACmB,OAAO,WACrB,IAAI,AADgC,KAAK,MAAM,GACzD,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC;EAoBnD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAxLjC,cAAc;kCACN,cAAc;0BAEtB,WAAW;kCAEqC,YAAY"}
package/src/facade.js CHANGED
@@ -27,7 +27,7 @@ const makeLocalChainFacade = localchain => {
27
27
  allowedMessages: [],
28
28
  allowedQueries: [],
29
29
  chainId: 'agoric-3',
30
- ibcConnectionInfo: anyVal,
30
+ connections: anyVal,
31
31
  ibcHooksEnabled: true,
32
32
  icaEnabled: true,
33
33
  icqEnabled: true,
@@ -6,7 +6,7 @@
6
6
  import type { Amount, Brand, NatAmount, Payment } from '@agoric/ertp/src/types.js';
7
7
  import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
8
8
  import type { Timestamp } from '@agoric/time';
9
- import type { KnownChains } from './types.js';
9
+ import type { IBCMsgTransferOptions, KnownChains } from './types.js';
10
10
  /**
11
11
  * A denom that designates a path to a token type on some blockchain.
12
12
  *
@@ -33,7 +33,7 @@ export type DenomAmount = {
33
33
  denom: Denom;
34
34
  value: bigint;
35
35
  };
36
- /** Amounts can be provided as pure data using denoms or as native Amounts */
36
+ /** Amounts can be provided as pure data using denoms or as ERTP Amounts */
37
37
  export type AmountArg = DenomAmount | Amount;
38
38
  /** An address on some blockchain, e.g., cosmos, eth, etc. */
39
39
  export type ChainAddress = {
@@ -108,14 +108,14 @@ export interface OrchestrationAccountI {
108
108
  /**
109
109
  * Transfer an amount to another account, typically on another chain.
110
110
  * The promise settles when the transfer is complete.
111
- * @param amount - the amount to transfer.
111
+ * @param amount - the amount to transfer. Can be provided as pure data using denoms or as ERTP Amounts.
112
112
  * @param destination - the account to transfer the amount to.
113
- * @param memo - an optional memo to include with the transfer, which could drive custom PFM behavior
113
+ * @param [opts] - an optional memo to include with the transfer, which could drive custom PFM behavior, and timeout parameters
114
114
  * @returns void
115
115
  *
116
116
  * TODO document the mapping from the address to the destination chain.
117
117
  */
118
- transfer: (amount: AmountArg, destination: ChainAddress, memo?: string) => Promise<void>;
118
+ transfer: (amount: AmountArg, destination: ChainAddress, opts?: IBCMsgTransferOptions) => Promise<void>;
119
119
  /**
120
120
  * Transfer an amount to another account in multiple steps. The promise settles when
121
121
  * the entire path of the transfer is complete.
@@ -1 +1 @@
1
- {"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,SAAS,EACT,OAAO,EACR,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,S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';
13
13
  import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
14
14
  import type { Timestamp } from '@agoric/time';
15
- import type { KnownChains } from './types.js';
15
+ import type { IBCMsgTransferOptions, KnownChains } from './types.js';
16
16
 
17
17
  /**
18
18
  * A denom that designates a path to a token type on some blockchain.
@@ -45,7 +45,7 @@ export type DenomAmount = {
45
45
  value: bigint; // Nat
46
46
  };
47
47
 
48
- /** Amounts can be provided as pure data using denoms or as native Amounts */
48
+ /** Amounts can be provided as pure data using denoms or as ERTP Amounts */
49
49
  export type AmountArg = DenomAmount | Amount;
50
50
 
51
51
  /** An address on some blockchain, e.g., cosmos, eth, etc. */
@@ -145,9 +145,9 @@ export interface OrchestrationAccountI {
145
145
  /**
146
146
  * Transfer an amount to another account, typically on another chain.
147
147
  * The promise settles when the transfer is complete.
148
- * @param amount - the amount to transfer.
148
+ * @param amount - the amount to transfer. Can be provided as pure data using denoms or as ERTP Amounts.
149
149
  * @param destination - the account to transfer the amount to.
150
- * @param memo - an optional memo to include with the transfer, which could drive custom PFM behavior
150
+ * @param [opts] - an optional memo to include with the transfer, which could drive custom PFM behavior, and timeout parameters
151
151
  * @returns void
152
152
  *
153
153
  * TODO document the mapping from the address to the destination chain.
@@ -155,7 +155,7 @@ export interface OrchestrationAccountI {
155
155
  transfer: (
156
156
  amount: AmountArg,
157
157
  destination: ChainAddress,
158
- memo?: string,
158
+ opts?: IBCMsgTransferOptions,
159
159
  ) => Promise<void>;
160
160
 
161
161
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAYO,0OAHI,eAAe,GAAG;IAAE,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,SAAS,EAAE,YAAY,OA+BjE,IAAK,cAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2GAwD+lJ,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;eAvF3gJ,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC;;kBAuDpI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;oCA3FgD,gCAAgC"}
1
+ {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAYO,0OAHI,eAAe,GAAG;IAAE,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,SAAS,EAAE,YAAY,OAgC9D,IAAI,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2GAuD4lJ,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;eAvF3gJ,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC;;kBAuDpI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;oCA3FgD,gCAAgC"}
@@ -1,24 +1,101 @@
1
- export function startStakeBld({ consume: { board, chainStorage, localchain, startUpgradable }, installation: { consume: { stakeBld }, }, instance: { produce: { stakeBld: produceInstance }, }, issuer: { consume: { [Stake.symbol]: stakeIssuer }, }, }: BootstrapPowers & {
1
+ export function startStakeBld({ consume: { board, chainStorage, chainTimerService: chainTimerServiceP, localchain, startUpgradable, }, installation: { consume: { stakeBld }, }, instance: { produce: { stakeBld: produceInstance }, }, issuer: { consume: { [Stake.symbol]: stakeIssuer }, }, }: BootstrapPowers & {
2
2
  installation: {
3
3
  consume: {
4
4
  stakeBld: Installation<(zcf: ZCF, privateArgs: {
5
- localchain: import("@agoric/vats/src/localchain.js").LocalChain;
6
- marshaller: Marshaller;
7
- storageNode: StorageNode;
5
+ localchain: import("@endo/exo").Guarded<{
6
+ makeAccount(): Promise<import("@endo/exo").Guarded<{
7
+ getAddress(): Promise<string>;
8
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
9
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
10
+ executeTx<MT extends {
11
+ '@type': string;
12
+ }[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
13
+ }>>;
14
+ query(request: import("@agoric/cosmic-proto").TypedJson): Promise<{
15
+ '@type': string;
16
+ }>;
17
+ queryMany(requests: import("@agoric/cosmic-proto").TypedJson[]): Promise<{
18
+ error?: string | undefined;
19
+ reply: {
20
+ '@type': string;
21
+ };
22
+ }[]>;
23
+ }>;
24
+ marshaller: {
25
+ toCapData: import("@endo/marshal").ToCapData<unknown>;
26
+ fromCapData: import("@endo/marshal").FromCapData<unknown>;
27
+ serialize: import("@endo/marshal").ToCapData<unknown>;
28
+ unserialize: import("@endo/marshal").FromCapData<unknown>;
29
+ };
30
+ storageNode: globalThis.StorageNode;
31
+ timerService: import("@agoric/time").TimerService;
32
+ timerBrand: import("@agoric/time").TimerBrand;
8
33
  }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
9
34
  publicFacet: import("@endo/exo").Guarded<{
10
35
  makeStakeBldInvitation(): Promise<Invitation<{
11
36
  publicSubscribers: {
12
37
  account: {
13
38
  description: string;
14
- subscriber: globalThis.Subscriber<import("../exos/localchainAccountKit.js").LocalChainAccountNotification>;
39
+ subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
40
+ storagePath: Promise<string>;
41
+ };
42
+ };
43
+ invitationMakers: import("@endo/exo").Guarded<{
44
+ Delegate(validatorAddress: any, amount: any): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
45
+ '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
46
+ }, undefined>>;
47
+ CloseAccount(): never;
48
+ TransferAccount(): never;
49
+ }>;
50
+ account: import("@endo/exo").Guarded<{
51
+ getPublicTopics(): {
52
+ account: {
53
+ description: string;
54
+ subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
55
+ storagePath: Promise<string>;
56
+ };
57
+ };
58
+ makeDelegateInvitation(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
59
+ '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
60
+ }, undefined>>;
61
+ makeCloseAccountInvitation(): never;
62
+ makeTransferAccountInvitation(): never;
63
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
64
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
65
+ getAddress(): string;
66
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
67
+ }>;
68
+ }, undefined>>;
69
+ makeAccount(): Promise<import("@endo/exo").Guarded<{
70
+ getPublicTopics(): {
71
+ account: {
72
+ description: string;
73
+ subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
74
+ storagePath: Promise<string>;
75
+ };
76
+ };
77
+ makeDelegateInvitation(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
78
+ '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
79
+ }, undefined>>;
80
+ makeCloseAccountInvitation(): never;
81
+ makeTransferAccountInvitation(): never;
82
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
83
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
84
+ getAddress(): string;
85
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
86
+ }>>;
87
+ makeAcountInvitationMaker(): Promise<Invitation<{
88
+ publicSubscribers: {
89
+ account: {
90
+ description: string;
91
+ subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
15
92
  storagePath: Promise<string>;
16
93
  };
17
94
  };
18
95
  invitationMakers: import("@endo/exo").Guarded<{
19
- Delegate(validatorAddress: any, amount: any): Promise<Invitation<(import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
96
+ Delegate(validatorAddress: any, amount: any): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
20
97
  '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
21
- })[], undefined>>;
98
+ }, undefined>>;
22
99
  CloseAccount(): never;
23
100
  TransferAccount(): never;
24
101
  }>;
@@ -26,15 +103,19 @@ export function startStakeBld({ consume: { board, chainStorage, localchain, star
26
103
  getPublicTopics(): {
27
104
  account: {
28
105
  description: string;
29
- subscriber: globalThis.Subscriber<import("../exos/localchainAccountKit.js").LocalChainAccountNotification>;
106
+ subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
30
107
  storagePath: Promise<string>;
31
108
  };
32
109
  };
33
- makeDelegateInvitation(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<(import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
110
+ makeDelegateInvitation(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
34
111
  '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
35
- })[], undefined>>;
112
+ }, undefined>>;
36
113
  makeCloseAccountInvitation(): never;
37
114
  makeTransferAccountInvitation(): never;
115
+ deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
116
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment>;
117
+ getAddress(): string;
118
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
38
119
  }>;
39
120
  }, undefined>>;
40
121
  }>;
@@ -52,6 +133,7 @@ export function getManifestForStakeBld({ restoreRef }: {
52
133
  consume: {
53
134
  board: boolean;
54
135
  chainStorage: boolean;
136
+ chainTimerService: boolean;
55
137
  localchain: boolean;
56
138
  startUpgradable: boolean;
57
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAUO,0PAFI,eAAe,GAAG;IAAC,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,QAAQ,EAAE,YAAY,OAI3E,GAAA,eACE;gBAAA,YAAe,OACjB,gCAEW,EAAE,UAAU,CAAC;gBAAA,YACxB,UACG,CAAC;gBAAA,aACO,WAAW,CAAC;aAAK,WAE1B,OACD,kBAAkB,EAAG,OAAM;;;;;;;;;;;;;;;;;;;;;;;;;yFAqDuhD,OAAO,KAAK,CAAC;;;;;;;;eAnE57C,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC,iBAsCxI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBN;sBAxEqB,gCAAgC"}
1
+ {"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAUO,kSAFI,eAAe,GAAG;IAAC,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,QAAQ,EAAE,YAAY,OAmBvE,GACL;;;;yCA6BC,QAAK,KAAK,CAAC,mBAEb,OAAO;yCAqBC,OAAA,KACR,CAAC;;;uCAOmb,EAAE;;mCAA6oE,OAAO,sBAAsB,EAAE,SAAS;;;wCAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;wBAtD/xG,OAAO,kBAAkB,EAAE,OAEzD;;;;;;;;;;;;;;;;;;;;;;;;;yFAoDwmF,OAAO,KAAK,CAAC;;;;;6CA/BpnF,QAAK,KAAK,CAAC,mBAEb,OAAO;6CAqBC,OAAA,KACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAzEqI,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC,iBAkDxI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BN;sBArFqB,gCAAgC"}