@agoric/orchestration 0.1.1-dev-a035bbe.0 → 0.1.1-dev-c244e96.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 (59) hide show
  1. package/package.json +16 -16
  2. package/src/chain-info.js +1 -1
  3. package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
  4. package/src/examples/sendAnywhere.contract.js +3 -2
  5. package/src/examples/stakeBld.contract.d.ts +23 -11
  6. package/src/examples/stakeBld.contract.d.ts.map +1 -1
  7. package/src/examples/stakeBld.contract.js +9 -5
  8. package/src/examples/stakeIca.contract.d.ts +3 -3
  9. package/src/examples/stakeIca.contract.js +1 -1
  10. package/src/examples/swapExample.contract.d.ts.map +1 -1
  11. package/src/examples/swapExample.contract.js +6 -1
  12. package/src/exos/{chainAccountKit.d.ts → chain-account-kit.d.ts} +1 -1
  13. package/src/exos/chain-account-kit.d.ts.map +1 -0
  14. package/src/exos/{chainAccountKit.js → chain-account-kit.js} +2 -2
  15. package/src/exos/{cosmosOrchestrationAccount.d.ts → cosmos-orchestration-account.d.ts} +1 -1
  16. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
  17. package/src/exos/{icqConnectionKit.d.ts → icq-connection-kit.d.ts} +1 -1
  18. package/src/exos/icq-connection-kit.d.ts.map +1 -0
  19. package/src/exos/local-chain-facade.d.ts +105 -0
  20. package/src/exos/local-chain-facade.d.ts.map +1 -0
  21. package/src/exos/local-chain-facade.js +67 -0
  22. package/src/exos/{local-chain-account-kit.d.ts → local-orchestration-account.d.ts} +33 -63
  23. package/src/exos/{local-chain-account-kit.d.ts.map → local-orchestration-account.d.ts.map} +1 -1
  24. package/src/exos/{local-chain-account-kit.js → local-orchestration-account.js} +48 -30
  25. package/src/exos/orchestrator.d.ts +4763 -0
  26. package/src/exos/orchestrator.d.ts.map +1 -0
  27. package/src/exos/orchestrator.js +93 -0
  28. package/src/exos/remote-chain-facade.d.ts +84 -0
  29. package/src/exos/remote-chain-facade.d.ts.map +1 -0
  30. package/src/exos/remote-chain-facade.js +81 -0
  31. package/src/facade.d.ts +88 -4
  32. package/src/facade.d.ts.map +1 -1
  33. package/src/facade.js +30 -169
  34. package/src/proposals/start-stakeAtom.d.ts +3 -3
  35. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  36. package/src/proposals/start-stakeBld.d.ts +23 -11
  37. package/src/proposals/start-stakeBld.d.ts.map +1 -1
  38. package/src/proposals/start-stakeOsmo.d.ts +3 -3
  39. package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
  40. package/src/service.js +3 -3
  41. package/src/typeGuards.d.ts +14 -0
  42. package/src/typeGuards.d.ts.map +1 -1
  43. package/src/typeGuards.js +15 -0
  44. package/src/types.d.ts +2 -2
  45. package/src/types.d.ts.map +1 -1
  46. package/src/types.ts +2 -2
  47. package/src/utils/chainHub.d.ts +15 -3
  48. package/src/utils/chainHub.d.ts.map +1 -1
  49. package/src/utils/chainHub.js +1 -1
  50. package/src/utils/orc.js +2 -2
  51. package/src/utils/orchestrationAccount.js +3 -4
  52. package/src/utils/start-helper.d.ts +9 -0
  53. package/src/utils/start-helper.d.ts.map +1 -1
  54. package/src/utils/start-helper.js +32 -3
  55. package/src/exos/chainAccountKit.d.ts.map +0 -1
  56. package/src/exos/cosmosOrchestrationAccount.d.ts.map +0 -1
  57. package/src/exos/icqConnectionKit.d.ts.map +0 -1
  58. /package/src/exos/{cosmosOrchestrationAccount.js → cosmos-orchestration-account.js} +0 -0
  59. /package/src/exos/{icqConnectionKit.js → icq-connection-kit.js} +0 -0
@@ -25,7 +25,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
25
25
  publicSubscribers: {
26
26
  account: {
27
27
  description: string;
28
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
28
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
29
29
  storagePath: Promise<string>;
30
30
  };
31
31
  };
@@ -42,7 +42,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
42
42
  getPublicTopics(): {
43
43
  account: {
44
44
  description: string;
45
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
45
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
46
46
  storagePath: Promise<string>;
47
47
  };
48
48
  };
@@ -63,7 +63,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
63
63
  publicSubscribers: {
64
64
  account: {
65
65
  description: string;
66
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
66
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
67
67
  storagePath: Promise<string>;
68
68
  };
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2CxB,IAAI,aACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CF,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAuDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCApG4C,+BAA+B"}
1
+ {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2CtB,IACH,aAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CJ,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAuDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCApG4C,+BAA+B"}
@@ -40,7 +40,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
40
40
  publicSubscribers: {
41
41
  account: {
42
42
  description: string;
43
- subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
43
+ subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
44
44
  storagePath: Promise<string>;
45
45
  };
46
46
  };
@@ -52,10 +52,12 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
52
52
  CloseAccount(): never;
53
53
  }>;
54
54
  account: import("@endo/exo").Guarded<{
55
+ getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
56
+ getBalances(): never;
55
57
  getPublicTopics(): {
56
58
  account: {
57
59
  description: string;
58
- subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
60
+ subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
59
61
  storagePath: Promise<string>;
60
62
  };
61
63
  };
@@ -63,20 +65,24 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
63
65
  '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
64
66
  }>>;
65
67
  undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
66
- deposit(payment: Payment<"nat">, optAmountShape?: Pattern): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
68
+ deposit(payment: globalThis.Payment<"nat">): Promise<void>;
67
69
  withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
68
70
  executeTx<MT extends {
69
71
  '@type': string;
70
72
  }[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
71
- getAddress(): string;
73
+ getAddress(): import("../orchestration-api.js").ChainAddress;
74
+ send(toAccount: any, amount: any): Promise<void>;
72
75
  transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
76
+ transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
73
77
  }>;
74
78
  }, undefined>>;
75
79
  makeAccount(): Promise<import("@endo/exo").Guarded<{
80
+ getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
81
+ getBalances(): never;
76
82
  getPublicTopics(): {
77
83
  account: {
78
84
  description: string;
79
- subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
85
+ subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
80
86
  storagePath: Promise<string>;
81
87
  };
82
88
  };
@@ -84,19 +90,21 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
84
90
  '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
85
91
  }>>;
86
92
  undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
87
- deposit(payment: Payment<"nat">, optAmountShape?: Pattern): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
93
+ deposit(payment: globalThis.Payment<"nat">): Promise<void>;
88
94
  withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
89
95
  executeTx<MT extends {
90
96
  '@type': string;
91
97
  }[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
92
- getAddress(): string;
98
+ getAddress(): import("../orchestration-api.js").ChainAddress;
99
+ send(toAccount: any, amount: any): Promise<void>;
93
100
  transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
101
+ transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
94
102
  }>>;
95
103
  makeAccountInvitationMaker(): Promise<Invitation<{
96
104
  publicSubscribers: {
97
105
  account: {
98
106
  description: string;
99
- subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
107
+ subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
100
108
  storagePath: Promise<string>;
101
109
  };
102
110
  };
@@ -108,10 +116,12 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
108
116
  CloseAccount(): never;
109
117
  }>;
110
118
  account: import("@endo/exo").Guarded<{
119
+ getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
120
+ getBalances(): never;
111
121
  getPublicTopics(): {
112
122
  account: {
113
123
  description: string;
114
- subscriber: globalThis.Subscriber<import("../exos/local-chain-account-kit.js").LocalChainAccountNotification>;
124
+ subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
115
125
  storagePath: Promise<string>;
116
126
  };
117
127
  };
@@ -119,13 +129,15 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
119
129
  '@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
120
130
  }>>;
121
131
  undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
122
- deposit(payment: Payment<"nat">, optAmountShape?: Pattern): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
132
+ deposit(payment: globalThis.Payment<"nat">): Promise<void>;
123
133
  withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
124
134
  executeTx<MT extends {
125
135
  '@type': string;
126
136
  }[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
127
- getAddress(): string;
137
+ getAddress(): import("../orchestration-api.js").ChainAddress;
138
+ send(toAccount: any, amount: any): Promise<void>;
128
139
  transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
140
+ transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
129
141
  }>;
130
142
  }, undefined>>;
131
143
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA6B7B,GAAA;;;;;0CA+D80B,MAAM,KAAK,CAAC;yCAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;yCAAwjB,OAAO,KAAK,CAAC;;;uCAA6rB,EAAE;;;;;;;gCAAqjG,CAAC;;;mCAA6lB,EAAE;;;;;;;;;;;;;wBA1DhzM,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;2EA0D05C,OAAO,KAAK,CAAC;;;6EAAid,OAAO,KAAK,CAAC;;;;;;;;;;;2EAAs4B,OAAO,KAAK,CAAC;;;6EAA+yB,OAAO,KAAK,CAAC;6CAAjxE,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6CAAwjB,OAAO,KAAK,CAAC;;;2CAA6rB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1FrpF,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN;sBApGqB,gCAAgC"}
1
+ {"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA6BpB,GAAG;;;;;0CA+Dk0B,MAAM,KAAK,CAAC;yCAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;yCAAwjB,OAAO,KAAK,CAAC;;;uCAA6rB,EAAE;;;;;;;gCAAqjG,CAAC;;;mCAA6lB,EAAE;;;;;;;;;;;;;wBA1DpyM,OAAO,kBAAkB,EAAG,OAAM;;;;;;;;;;;2EA0DqhC,OAAO,KAAK,CAAC;;;6EAAid,OAAO,KAAK,CAAC;;;;8CAA0tB,QAAS;;;;;;;;;2EAAiyB,OAAO,KAAK,CAAC;;;6EAA+yB,OAAO,KAAK,CAAC;;6CAA56D,OAAO,KAAK,CAAC;;;2CAA6rB,EAAE;;;;kDAA46B,SAAU,OAAM,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1F7lH,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN;sBApGqB,gCAAgC"}
@@ -25,7 +25,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
25
25
  publicSubscribers: {
26
26
  account: {
27
27
  description: string;
28
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
28
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
29
29
  storagePath: Promise<string>;
30
30
  };
31
31
  };
@@ -42,7 +42,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
42
42
  getPublicTopics(): {
43
43
  account: {
44
44
  description: string;
45
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
45
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
46
46
  storagePath: Promise<string>;
47
47
  };
48
48
  };
@@ -63,7 +63,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
63
63
  publicSubscribers: {
64
64
  account: {
65
65
  description: string;
66
- subscriber: globalThis.Subscriber<import("../exos/cosmosOrchestrationAccount.js").ComosOrchestrationAccountNotification>;
66
+ subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
67
67
  storagePath: Promise<string>;
68
68
  };
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2ClB,IAAK,aAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CO,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN"}
1
+ {"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2ChB,IAAI,aACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CK,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN"}
package/src/service.js CHANGED
@@ -3,8 +3,8 @@
3
3
  import { V as E } from '@agoric/vow/vat.js';
4
4
  import { M } from '@endo/patterns';
5
5
  import { Shape as NetworkShape } from '@agoric/network';
6
- import { prepareChainAccountKit } from './exos/chainAccountKit.js';
7
- import { prepareICQConnectionKit } from './exos/icqConnectionKit.js';
6
+ import { prepareChainAccountKit } from './exos/chain-account-kit.js';
7
+ import { prepareICQConnectionKit } from './exos/icq-connection-kit.js';
8
8
  import {
9
9
  makeICAChannelAddress,
10
10
  makeICQChannelAddress,
@@ -133,7 +133,7 @@ const prepareOrchestrationKit = (
133
133
  remoteConnAddr,
134
134
  chainAccountKit.connectionHandler,
135
135
  );
136
- // XXX if we fail, should we close the port (if it was created in this flow)?
136
+ // FIXME if we fail, should we close the port (if it was created in this flow)?
137
137
  return chainAccountKit.account;
138
138
  },
139
139
  /**
@@ -34,4 +34,18 @@ export const IBCChannelInfoShape: import("@endo/patterns").Matcher;
34
34
  export const IBCConnectionIDShape: import("@endo/patterns").Matcher;
35
35
  export const IBCConnectionInfoShape: import("@endo/patterns").Matcher;
36
36
  export const CosmosChainInfoShape: import("@endo/patterns").Matcher;
37
+ export const ChainInfoShape: import("@endo/patterns").Matcher;
38
+ export const LocalChainAccountShape: import("@endo/patterns").Matcher;
39
+ export const DenomShape: import("@endo/patterns").Matcher;
40
+ export const BrandInfoShape: import("@endo/patterns").Matcher;
41
+ export namespace DenomAmountShape {
42
+ export { DenomShape as denom };
43
+ let value_3: import("@endo/patterns").Matcher;
44
+ export { value_3 as value };
45
+ }
46
+ /** @see {Chain} */
47
+ export const ChainFacadeI: import("@endo/patterns").InterfaceGuard<{
48
+ getChainInfo: import("@endo/patterns").MethodGuard;
49
+ makeAccount: import("@endo/patterns").MethodGuard;
50
+ }>;
37
51
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE;AAGF,8DAAsC;AACtC,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG"}
package/src/typeGuards.js CHANGED
@@ -77,3 +77,18 @@ export const CosmosChainInfoShape = M.splitRecord(
77
77
  icqEnabled: M.boolean(),
78
78
  },
79
79
  );
80
+
81
+ // FIXME more validation
82
+ export const ChainInfoShape = M.any();
83
+ export const LocalChainAccountShape = M.remotable('LocalChainAccount');
84
+ export const DenomShape = M.string();
85
+ // FIXME more validation
86
+ export const BrandInfoShape = M.any();
87
+
88
+ export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
89
+
90
+ /** @see {Chain} */
91
+ export const ChainFacadeI = M.interface('ChainFacade', {
92
+ getChainInfo: M.callWhen().returns(ChainInfoShape),
93
+ makeAccount: M.callWhen().returns(M.remotable('OrchestrationAccount')),
94
+ });
package/src/types.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  export type * from './chain-info.js';
3
3
  export type * from './cosmos-api.js';
4
4
  export type * from './ethereum-api.js';
5
- export type * from './exos/chainAccountKit.js';
6
- export type * from './exos/icqConnectionKit.js';
5
+ export type * from './exos/chain-account-kit.js';
6
+ export type * from './exos/icq-connection-kit.js';
7
7
  export type * from './orchestration-api.js';
8
8
  export type * from './service.js';
9
9
  export type * from './vat-orchestration.js';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,wBAAwB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,wBAAwB,CAAC"}
package/src/types.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  export type * from './chain-info.js';
4
4
  export type * from './cosmos-api.js';
5
5
  export type * from './ethereum-api.js';
6
- export type * from './exos/chainAccountKit.js';
7
- export type * from './exos/icqConnectionKit.js';
6
+ export type * from './exos/chain-account-kit.js';
7
+ export type * from './exos/icq-connection-kit.js';
8
8
  export type * from './orchestration-api.js';
9
9
  export type * from './service.js';
10
10
  export type * from './vat-orchestration.js';
@@ -47,6 +47,15 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
47
47
  'cosmoshub-4': {
48
48
  id: "connection-1";
49
49
  client_id: string;
50
+ /**
51
+ * Character used in a connection tuple key to separate the two chain ids. Valid
52
+ * because a chainId can contain only alphanumerics and dash.
53
+ *
54
+ * Vstorage keys can be only alphanumerics, dash or underscore. That leaves
55
+ * underscore as the only valid separator.
56
+ *
57
+ * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md}
58
+ */
50
59
  counterparty: {
51
60
  client_id: string;
52
61
  connection_id: "connection-1";
@@ -58,8 +67,7 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
58
67
  transferChannel: {
59
68
  portId: string;
60
69
  channelId: "channel-1";
61
- counterPartyChannelId: "channel-1";
62
- /**
70
+ counterPartyChannelId: "channel-1"; /**
63
71
  * The entries of the top-level namehubs in agoricNames are reflected to
64
72
  * vstorage. But only the top level. So we combine the 2 chain ids into 1 key.
65
73
  * Connections are directionless, so we sort the ids.
@@ -84,10 +92,14 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
84
92
  };
85
93
  };
86
94
  state: 3;
95
+ /**
96
+ * @param {Remote<NameHub>} agoricNames
97
+ * @param {Zone} [zone]
98
+ */
87
99
  transferChannel: {
88
100
  portId: string;
89
101
  channelId: "channel-0";
90
- counterPartyChannelId: "channel-1";
102
+ counterPartyChannelId: "channel-1"; /** @type {MapStore<string, CosmosChainInfo>} */
91
103
  counterPartyPortId: string;
92
104
  ordering: 1;
93
105
  state: 3;
@@ -1 +1 @@
1
- {"version":3,"file":"chainHub.d.ts","sourceRoot":"","sources":["chainHub.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AAEH,wCAAwC;AACxC,gCAAiC;AACjC,kCAAkC;AAClC,gDAAiD;AAqB1C,wCAHI,MAAM,YACN,MAAM,UAUhB;AAMM;IAaH;;;;;;;;;;;OAWG;wBAFQ,MAAM;;;;;;;;IAMjB;;;;;;;;OAQG;iBAHuB,CAAC,4BAAD,CAAC,AAHf;;;;;;;;;;;;;;;;;;;wBApDhB;;;;;;;2BAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAgBD,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;OAIG;iCAHQ,MAAM,YACN,MAAM;IAQjB;;;;OAIG;gCAHQ,MAAM,YACN,MAAM;EAoBpB;AASM,gDALI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,QACpD,MAAM;;;;;;;UAEN,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,iBAgCzC;uBAtCa,UAAU,CAAC,OAAO,YAAY,CAAC;6BAlInB,cAAc;4BAGf,kBAAkB;0BACpB,cAAc;uCAHgB,kBAAkB;+BAC9B,kBAAkB"}
@@ -163,7 +163,7 @@ export const registerChain = async (
163
163
  .then(() => log(`registered agoricNames chain.${name}`)),
164
164
  ];
165
165
 
166
- // XXX updates redundantly, twice per edge
166
+ // FIXME updates redundantly, twice per edge
167
167
  for await (const [counterChainId, connInfo] of Object.entries(connections)) {
168
168
  const key = connectionKey(chainInfo.chainId, counterChainId);
169
169
  promises.push(
package/src/utils/orc.js CHANGED
@@ -8,7 +8,7 @@ export const orcUtils = {
8
8
  * @returns {TransferMsg}
9
9
  */
10
10
  makeTransferMsg: _args => {
11
- // XXX mocked, so typescript is happy
11
+ // FIXME mocked, so typescript is happy
12
12
  return {
13
13
  toAccount: {
14
14
  chainId: 'osmosis-test',
@@ -26,7 +26,7 @@ export const orcUtils = {
26
26
  * @returns {TransferMsg}
27
27
  */
28
28
  makeOsmosisSwap(_args) {
29
- // XXX mocked, so typescript is happy
29
+ // FIXME mocked, so typescript is happy
30
30
  return {
31
31
  toAccount: {
32
32
  chainId: 'osmosis-test',
@@ -4,16 +4,15 @@ import { AmountArgShape, ChainAddressShape, CoinShape } from '../typeGuards.js';
4
4
 
5
5
  /** @import {OrchestrationAccountI} from '../orchestration-api.js'; */
6
6
 
7
- // TODO complete this interface
8
7
  /** @see {OrchestrationAccountI} */
9
8
  export const orchestrationAccountMethods = {
10
9
  getAddress: M.call().returns(ChainAddressShape),
11
10
  getBalance: M.callWhen(M.any()).returns(CoinShape),
12
11
  getBalances: M.callWhen().returns(M.arrayOf(CoinShape)),
13
12
  send: M.callWhen(ChainAddressShape, AmountArgShape).returns(M.undefined()),
14
- transfer: M.callWhen(AmountArgShape, ChainAddressShape).returns(
15
- M.undefined(),
16
- ),
13
+ transfer: M.callWhen(AmountArgShape, ChainAddressShape)
14
+ .optional(M.record())
15
+ .returns(M.undefined()),
17
16
  transferSteps: M.callWhen(AmountArgShape, M.any()).returns(M.undefined()),
18
17
  deposit: M.callWhen(PaymentShape).returns(M.undefined()),
19
18
  };
@@ -102,6 +102,15 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
102
102
  readonly counterPartyPortId: "transfer";
103
103
  readonly ordering: 0;
104
104
  readonly state: 3;
105
+ /**
106
+ * Helper that a contract start function can use to set up the objects needed
107
+ * for orchestration.
108
+ *
109
+ * @param {ZCF} zcf
110
+ * @param {Baggage} baggage
111
+ * @param {OrchestrationPowers} remotePowers
112
+ * @param {Marshaller} marshaller
113
+ */
105
114
  readonly version: "ics20-1";
106
115
  };
107
116
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAqCO,0CALI,GAAG,kCAEH,mBAAmB,cACnB,UAAU;;;;;;;;;;kDAsCkmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEA2CM,OAAO,kEAEF,OAAQ,WAAU,IAAK,qBAGH,IAAK;EAatC;;;;;8BAEkH,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;;;;;;;;;;;;;6BAvF7jL,kBAAkB;4BAEnB,aAAa;kCAHK,cAAc;6BAE/B,cAAc"}
@@ -2,9 +2,12 @@ import { prepareAsyncFlowTools } from '@agoric/async-flow';
2
2
  import { prepareVowTools } from '@agoric/vow';
3
3
  import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
4
4
  import { makeDurableZone } from '@agoric/zone/durable.js';
5
- import { prepareLocalChainAccountKit } from '../exos/local-chain-account-kit.js';
5
+ import { prepareLocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
6
6
  import { makeOrchestrationFacade } from '../facade.js';
7
7
  import { makeChainHub } from './chainHub.js';
8
+ import { prepareRemoteChainFacade } from '../exos/remote-chain-facade.js';
9
+ import { prepareCosmosOrchestrationAccount } from '../exos/cosmos-orchestration-account.js';
10
+ import { prepareLocalChainFacade } from '../exos/local-chain-facade.js';
8
11
 
9
12
  /**
10
13
  * @import {PromiseKit} from '@endo/promise-kit'
@@ -46,7 +49,7 @@ export const provideOrchestration = (
46
49
  const chainHub = makeChainHub(remotePowers.agoricNames);
47
50
 
48
51
  const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);
49
- const makeLocalChainAccountKit = prepareLocalChainAccountKit(
52
+ const makeLocalOrchestrationAccountKit = prepareLocalOrchestrationAccountKit(
50
53
  zone,
51
54
  makeRecorderKit,
52
55
  zcf,
@@ -59,12 +62,38 @@ export const provideOrchestration = (
59
62
  vowTools,
60
63
  });
61
64
 
65
+ const makeCosmosOrchestrationAccount = prepareCosmosOrchestrationAccount(
66
+ // FIXME what zone?
67
+ zone,
68
+ makeRecorderKit,
69
+ zcf,
70
+ );
71
+
72
+ const makeRemoteChainFacade = prepareRemoteChainFacade(zone, {
73
+ makeCosmosOrchestrationAccount,
74
+ orchestration: remotePowers.orchestrationService,
75
+ storageNode: remotePowers.storageNode,
76
+ timer: remotePowers.timerService,
77
+ });
78
+
79
+ const makeLocalChainFacade = prepareLocalChainFacade(zone, {
80
+ makeLocalOrchestrationAccountKit,
81
+ localchain: remotePowers.localchain,
82
+ // FIXME what path?
83
+ storageNode: remotePowers.storageNode,
84
+ orchestration: remotePowers.orchestrationService,
85
+ timer: remotePowers.timerService,
86
+ });
87
+
62
88
  const facade = makeOrchestrationFacade({
63
89
  zcf,
64
90
  zone,
65
91
  chainHub,
66
- makeLocalChainAccountKit,
92
+ makeLocalOrchestrationAccountKit,
67
93
  makeRecorderKit,
94
+ makeCosmosOrchestrationAccount,
95
+ makeLocalChainFacade,
96
+ makeRemoteChainFacade,
68
97
  asyncFlowTools,
69
98
  ...remotePowers,
70
99
  });
@@ -1 +0,0 @@
1
- {"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAaG;AAeI;;QAqBC,8BAA8B;;;;;;;;QAiC9B;;;;;;;;;WASG;mLAHU,OAAO,CAAC,MAAM,CAAC;QAa5B,+BAA+B;;QAS/B;;;;WAIG;wBADQ,KAAK;;;QAQhB;;;;WAIG;;;;;GAyBR;qCAzJW,0BAA0B;;aAoB1B,MAAM;;;;4BAIS,MAAM;;;;8BAmIrB,UAAU,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;0BAvK5C,mBAAmB;0BACP,iBAAiB;kCAKrB,aAAa;4BAFnB,8CAA8C;gCAHpC,iBAAiB;4BAC3B,aAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cosmosOrchestrationAccount.d.ts","sourceRoot":"","sources":["cosmosOrchestrationAccount.js"],"names":[],"mappings":"AAmDA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,mCAAmC;AACnC;;;;;;;;;;;;;;;GAqBG;AAOH,6CAGE;AAgBK,mGAgCsB,WAAW,GACnC,QAAI,OAAO,WAAW,EAAE,MAAM,CAAC,WACnC,CAAC,CAAC,0HApCQ,GAAG;;;;;;;;;;;QAuDN,wDAAwD;;;QAWxD;;;WAGG;;;;QAgBH;;;WAGG;;QASH;;;;WAIG;;QAaH,gDAAgD;;QAShD,kEAAkE;;;QAYlE;;;;WAIG;;;;;;;;;;;;;gBAtDH;;;mBAGG;;gBASH;;;;mBAIG;;gBAaH,gDAAgD;;gBAShD,kEAAkE;;;gBAYlE;;;;mBAIG;;;;;;;;;;;;QA2BH,8BAA8B;;QAI9B;;;;;WAKG;;;;QA2BH;;;;;;WAMG;;QAmBH;;;WAGG;;QAmBH;;;WAGG;;;;;;QA4CH,kEAAkE;;;GAgCzE;AAkBM,0IAvTs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