@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,55 @@
1
+ /**
2
+ * @import {Remote, Vow} from '@agoric/vow';
3
+ * @import {Zone} from '@agoric/zone';
4
+ * @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
5
+ * @import {CosmosChainInfo, Denom, DenomDetail, OrchestrationAccount} from '@agoric/orchestration';
6
+ * @import {VTransferIBCEvent} from '@agoric/vats';
7
+ * @import {ZCF} from '@agoric/zoe';
8
+ * @import {Marshaller} from '@agoric/internal/src/lib-chainStorage.js';
9
+ * @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
10
+ */
11
+ export const SingleNatAmountRecord: import("@endo/patterns").Matcher;
12
+ export function contract(zcf: ZCF, privateArgs: OrchestrationPowers & {
13
+ assetInfo?: [Denom, DenomDetail & {
14
+ brandKey?: string;
15
+ }][];
16
+ chainInfo?: Record<string, CosmosChainInfo>;
17
+ marshaller: Remote<Marshaller>;
18
+ storageNode: Remote<StorageNode>;
19
+ }, zone: Zone, { cachingMarshaller, chainHub, orchestrate, vowTools, zoeTools }: OrchestrationTools): Promise<{
20
+ publicFacet: import("@endo/exo").Guarded<{
21
+ makeSwapInvitation(): Promise<import("@agoric/zoe").Invitation<Vow<string>, import("./swap-anything.flows.js").SwapInfo>>;
22
+ }>;
23
+ creatorFacet: import("@endo/exo").Guarded<{
24
+ registerChain(chainName: string, chainInfo: import("@agoric/orchestration").ChainInfo, ibcConnectionInfo?: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
25
+ registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
26
+ }>;
27
+ }>;
28
+ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
29
+ assetInfo?: [Denom, DenomDetail & {
30
+ brandKey?: string;
31
+ }][];
32
+ chainInfo?: Record<string, CosmosChainInfo>;
33
+ marshaller: Remote<Marshaller>;
34
+ storageNode: Remote<StorageNode>;
35
+ }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
36
+ publicFacet: import("@endo/exo").Guarded<{
37
+ makeSwapInvitation(): Promise<import("@agoric/zoe").Invitation<Vow<string>, import("./swap-anything.flows.js").SwapInfo>>;
38
+ }>;
39
+ creatorFacet: import("@endo/exo").Guarded<{
40
+ registerChain(chainName: string, chainInfo: import("@agoric/orchestration").ChainInfo, ibcConnectionInfo?: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
41
+ registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
42
+ }>;
43
+ }>;
44
+ import type { ZCF } from '@agoric/zoe';
45
+ import type { OrchestrationPowers } from '../utils/start-helper.js';
46
+ import type { Denom } from '@agoric/orchestration';
47
+ import type { DenomDetail } from '@agoric/orchestration';
48
+ import type { CosmosChainInfo } from '@agoric/orchestration';
49
+ import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
50
+ import type { Remote } from '@agoric/vow';
51
+ import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
52
+ import type { Zone } from '@agoric/zone';
53
+ import type { OrchestrationTools } from '../utils/start-helper.js';
54
+ import type { Vow } from '@agoric/vow';
55
+ //# sourceMappingURL=swap-anything.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap-anything.contract.d.ts","sourceRoot":"","sources":["swap-anything.contract.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AAEH,qEAGE;AAmBK,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,QACO,IAAI,oEACJ,kBAAkB;;;;;;;;GA6I5B;AAGD;gBAtJiB,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;gBAC9C,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,OAAO,UAAU,CAAC;iBACjB,OAAO,WAAW,CAAC;;;;;;;;;GAmJ0C;yBAzKzD,aAAa;yCAHuB,0BAA0B;2BACR,uBAAuB;iCAAvB,uBAAuB;qCAAvB,uBAAuB;gCAGtE,0CAA0C;4BANzC,aAAa;iCAOb,0CAA0C;0BANjD,cAAc;wCACqB,0BAA0B;yBAFtD,aAAa"}
@@ -0,0 +1,32 @@
1
+ export function swapIt(orch: Orchestrator, { chainHub, sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat }, }: {
2
+ chainHub: GuestInterface<ChainHub>;
3
+ sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
4
+ zoeTools: GuestInterface<ZoeTools>;
5
+ log: GuestOf<(msg: string, level?: string) => Vow<void>>;
6
+ }, seat: ZCFSeat, offerArgs: SwapInfo): Promise<string>;
7
+ export function swapAnythingViaHook(_orch: Orchestrator, { chainHub, sharedLocalAccountP }: {
8
+ chainHub: GuestInterface<ChainHub>;
9
+ sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
10
+ }, { denom, value }: DenomAmount, memoArgs: SwapInfo): Promise<void>;
11
+ export type SwapInfo = {
12
+ destAddr: string;
13
+ receiverAddr: string;
14
+ outDenom: Denom;
15
+ slippage: {
16
+ slippagePercentage: string;
17
+ windowSeconds: number;
18
+ };
19
+ onFailedDelivery: string;
20
+ nextMemo?: string;
21
+ };
22
+ import type { Orchestrator } from '../types.js';
23
+ import type { ChainHub } from '../types.js';
24
+ import type { GuestInterface } from '@agoric/async-flow';
25
+ import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
26
+ import type { ZoeTools } from '../utils/zoe-tools.js';
27
+ import type { Vow } from '@agoric/vow';
28
+ import type { GuestOf } from '@agoric/async-flow';
29
+ import type { ZCFSeat } from '@agoric/zoe';
30
+ import type { DenomAmount } from '../types.js';
31
+ import type { Denom } from '@agoric/orchestration';
32
+ //# sourceMappingURL=swap-anything.flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap-anything.flows.d.ts","sourceRoot":"","sources":["swap-anything.flows.js"],"names":[],"mappings":"AA8EO,6BAXI,YAAY,wFAEpB;IAAsC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IAC6C,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IACiC,GAAG,EAA5D,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;CAC3D,QAAQ,OAAO,aACP,QAAQ,mBAwFlB;AAYM,2CAPI,YAAY,qCAEpB;IAAsC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IAC6C,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvE,oBAAQ,WAAW,YACX,QAAQ,iBAgDlB;uBAnNY;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,EAAE;QAAE,kBAAkB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;kCAQsF,aAAa;8BAAb,aAAa;oCAN7D,oBAAoB;kDAIf,wCAAwC;8BAC5D,uBAAuB;yBAF5B,aAAa;6BAHO,oBAAoB;6BAEpC,aAAa;iCAImD,aAAa;2BAL/E,uBAAuB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @import {TimerService} from '@agoric/time';
3
+ * @import {LocalChain} from '@agoric/vats/src/localchain.js';
4
+ * @import {Remote} from '@agoric/internal';
5
+ * @import {CosmosInterchainService} from '../exos/exo-interfaces.js';
6
+ * @import {NameHub} from '@agoric/vats';
7
+ * @import {Zone} from '@agoric/zone';
8
+ * @import {OrchestrationTools} from '../utils/start-helper.js';
9
+ * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
10
+ * @import {ContractMeta} from '@agoric/zoe';
11
+ * @import {ZCF} from '@agoric/zoe';
12
+ * @import {Brand} from '@agoric/ertp';
13
+ * @import {NatValue} from '@agoric/ertp';
14
+ * @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
15
+ * @import {Marshaller} from '@agoric/internal/src/lib-chainStorage.js';
16
+ */
17
+ /** @type {ContractMeta<typeof start>} */
18
+ export const meta: ContractMeta<typeof start>;
19
+ export function makeNatAmountShape(brand: Brand, min?: NatValue): {
20
+ brand: Brand;
21
+ value: import("@endo/patterns").Matcher;
22
+ };
23
+ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: {
24
+ agoricNames: Remote<NameHub>;
25
+ localchain: Remote<LocalChain>;
26
+ orchestrationService: Remote<CosmosInterchainService>;
27
+ storageNode: Remote<StorageNode>;
28
+ timerService: Remote<TimerService>;
29
+ marshaller: Remote<Marshaller>;
30
+ chainInfo: Record<string, CosmosChainInfo>;
31
+ assetInfo: [Denom, DenomDetail & {
32
+ brandKey?: string;
33
+ }][];
34
+ }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
35
+ publicFacet: import("@endo/exo").Guarded<{
36
+ makeSwapAndStakeInvitation(): Promise<import("@agoric/zoe").Invitation<import("@agoric/vow").Vow<void>, {
37
+ staked: import("@agoric/ertp").Amount<"nat">;
38
+ validator: import("@agoric/orchestration").CosmosValidatorAddress;
39
+ }>>;
40
+ }>;
41
+ }>;
42
+ import type { ContractMeta } from '@agoric/zoe';
43
+ import type { Brand } from '@agoric/ertp';
44
+ import type { NatValue } from '@agoric/ertp';
45
+ import type { ZCF } from '@agoric/zoe';
46
+ import type { NameHub } from '@agoric/vats';
47
+ import type { Remote } from '@agoric/internal';
48
+ import type { LocalChain } from '@agoric/vats/src/localchain.js';
49
+ import type { CosmosInterchainService } from '../exos/exo-interfaces.js';
50
+ import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
51
+ import type { TimerService } from '@agoric/time';
52
+ import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
53
+ import type { CosmosChainInfo } from '@agoric/orchestration';
54
+ import type { Denom } from '@agoric/orchestration';
55
+ import type { DenomDetail } from '@agoric/orchestration';
56
+ //# sourceMappingURL=swap.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap.contract.d.ts","sourceRoot":"","sources":["swap.contract.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAanC;AASK,0CAHI,KAAK,QACL,QAAQ;;;EAGmC;AAkDtD;iBA1CkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;kBAClB,OAAO,YAAY,CAAC;gBACtB,OAAO,UAAU,CAAC;eACnB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;eAC/B,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;GAmCiB;kCAjFhD,aAAa;2BAEpB,cAAc;8BACX,cAAc;yBAFnB,aAAa;6BALT,cAAc;4BAFf,kBAAkB;gCADd,gCAAgC;6CAEnB,2BAA2B;iCASvC,0CAA0C;kCAZzC,cAAc;gCAahB,0CAA0C;qCANjB,uBAAuB;2BAAvB,uBAAuB;iCAAvB,uBAAuB"}
@@ -0,0 +1,12 @@
1
+ export function stakeAndSwap(orch: Orchestrator, { localTransfer }: {
2
+ localTransfer: LocalTransfer;
3
+ }, seat: ZCFSeat, offerArgs: {
4
+ staked: Amount<"nat">;
5
+ validator: CosmosValidatorAddress;
6
+ }): Promise<void>;
7
+ import type { Orchestrator } from '../types.js';
8
+ import type { LocalTransfer } from '../utils/zoe-tools.js';
9
+ import type { ZCFSeat } from '@agoric/zoe';
10
+ import type { Amount } from '@agoric/ertp';
11
+ import type { CosmosValidatorAddress } from '../types.js';
12
+ //# sourceMappingURL=swap.flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap.flows.d.ts","sourceRoot":"","sources":["swap.flows.js"],"names":[],"mappings":"AAoBO,mCARI,YAAY,qBAEpB;IAA2B,aAAa,EAAhC,aAAa;CACrB,QAAQ,OAAO,aAEf;IAAiC,MAAM,EAA/B,OAAO,KAAK,CAAC;IACqB,SAAS,EAA3C,sBAAsB;CAChC,iBAsCA;kCArDyE,aAAa;mCADvD,uBAAuB;6BAE7B,aAAa;4BACd,cAAc;4CAFmC,aAAa"}
@@ -0,0 +1,21 @@
1
+ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: {
2
+ agoricNames: Remote<NameHub>;
3
+ localchain: Remote<LocalChain>;
4
+ orchestrationService: Remote<CosmosInterchainService>;
5
+ storageNode: Remote<StorageNode>;
6
+ marshaller: Remote<Marshaller>;
7
+ timerService: Remote<TimerService>;
8
+ }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
9
+ publicFacet: import("@endo/exo").Guarded<{
10
+ makeUnbondAndTransferInvitation(): Promise<import("@agoric/zoe").Invitation<import("@agoric/vow").Vow<void>, undefined>>;
11
+ }>;
12
+ }>;
13
+ import type { ZCF } from '@agoric/zoe';
14
+ import type { NameHub } from '@agoric/vats';
15
+ import type { Remote } from '@agoric/internal';
16
+ import type { LocalChain } from '@agoric/vats/src/localchain.js';
17
+ import type { CosmosInterchainService } from '../exos/exo-interfaces.js';
18
+ import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
19
+ import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
20
+ import type { TimerService } from '@agoric/time';
21
+ //# sourceMappingURL=unbond.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unbond.contract.d.ts","sourceRoot":"","sources":["unbond.contract.js"],"names":[],"mappings":"AA2DA;iBArCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;gBACpB,OAAO,UAAU,CAAC;kBAChB,OAAO,YAAY,CAAC;;;;;GAgCwC;yBA/CzD,aAAa;6BALT,cAAc;4BACf,kBAAkB;gCAFd,gCAAgC;6CAInB,2BAA2B;iCAGvC,0CAA0C;gCAC3C,0CAA0C;kCATxC,cAAc"}
@@ -0,0 +1,6 @@
1
+ export function unbondAndTransfer(orch: Orchestrator, { zcfTools }: {
2
+ zcfTools: ZcfTools;
3
+ }): Promise<void>;
4
+ import type { Orchestrator } from '../types.js';
5
+ import type { ZcfTools } from '../types.js';
6
+ //# sourceMappingURL=unbond.flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unbond.flows.d.ts","sourceRoot":"","sources":["unbond.flows.js"],"names":[],"mappings":"AAcO,wCAJI,YAAY,gBAEpB;IAAsB,QAAQ,EAAtB,QAAQ;CAClB,iBAwBA;kCAhCqF,aAAa;8BAAb,aAAa"}
@@ -0,0 +1,27 @@
1
+ export function prepareChainHubAdmin(zone: Zone, chainHub: ChainHub): import("@endo/exo").Guarded<{
2
+ /**
3
+ * Register information for a Cosmos chain
4
+ *
5
+ * @param {string} chainName - must not exist in chainHub
6
+ * @param {ChainInfo} chainInfo
7
+ * @param {IBCConnectionInfo} [ibcConnectionInfo] - from Agoric chain
8
+ */
9
+ registerChain(chainName: string, chainInfo: ChainInfo, ibcConnectionInfo?: IBCConnectionInfo): Promise<void>;
10
+ /**
11
+ * Register an asset that may be held on a chain other than the issuing
12
+ * chain.
13
+ *
14
+ * @param {Denom} denom - on the holding chain, whose name is given in
15
+ * `detail.chainName`
16
+ * @param {DenomDetail} detail - chainName and baseName must be registered
17
+ */
18
+ registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
19
+ }>;
20
+ export type ChainHubAdmin = ReturnType<typeof prepareChainHubAdmin>;
21
+ import type { Zone } from '@agoric/zone';
22
+ import type { ChainHub } from './chain-hub.js';
23
+ import type { ChainInfo } from '@agoric/orchestration';
24
+ import type { IBCConnectionInfo } from '@agoric/network/ibc';
25
+ import type { Denom } from '@agoric/orchestration';
26
+ import type { DenomDetail } from './chain-hub.js';
27
+ //# sourceMappingURL=chain-hub-admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-hub-admin.d.ts","sourceRoot":"","sources":["chain-hub-admin.js"],"names":[],"mappings":"AAgCO,2CAHI,IAAI,YACJ,QAAQ;IAab;;;;;;OAMG;6BAHQ,MAAM,aACN,SAAS,sBACT,iBAAiB;IAiB5B;;;;;;;OAOG;yBAHQ,KAAK,UAEL,WAAW;GAU3B;4BAEa,UAAU,CAAC,OAAO,oBAAoB,CAAC;0BA5E9B,cAAc;8BAGG,gBAAgB;+BADJ,uBAAuB;uCADvC,qBAAqB;2BACL,uBAAuB;iCACnC,gBAAgB"}
@@ -0,0 +1,225 @@
1
+ /**
2
+ * @import {NameHub} from '@agoric/vats';
3
+ * @import {Vow, VowTools} from '@agoric/vow';
4
+ * @import {Zone} from '@agoric/zone';
5
+ * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute, GoDuration, Bech32Address} from '../cosmos-api.js';
6
+ * @import {KnownChains} from '../chain-info.js';
7
+ * @import {AccountId, CosmosChainAddress, ChainInfo, CaipChainId, Denom, DenomAmount, AccountIdArg} from '../orchestration-api.js';
8
+ * @import {Remote, TypedPattern} from '@agoric/internal';
9
+ * @import {Pattern} from '@endo/patterns';
10
+ * @import {MapStore, SetStore} from '@agoric/store';
11
+ * @import {Brand} from '@agoric/ertp';
12
+ */
13
+ /** receiver address value for ibc transfers that involve PFM */
14
+ export const PFM_RECEIVER: "pfm";
15
+ export type HubName = (typeof HubName)[keyof typeof HubName];
16
+ export namespace HubName {
17
+ let Chain: "chain";
18
+ let ChainAssets: "chainAssets";
19
+ let ChainConnection: "chainConnection";
20
+ }
21
+ /** @deprecated use HubName.Chain */
22
+ export const CHAIN_KEY: "chain";
23
+ /** @deprecated use HubName.ChainConnection */
24
+ export const CONNECTIONS_KEY: "chainConnection";
25
+ /** @deprecated use HubName.ChainAssets */
26
+ export const ASSETS_KEY: "chainAssets";
27
+ export function encodeChainId(chainId: string): string;
28
+ export function connectionKey(chainId1: string, chainId2: string): IbcConnectionKey;
29
+ export function normalizeConnectionInfo(primaryChainId: string, counterChainId: string, directed: IBCConnectionInfo): [IbcConnectionKey, IBCConnectionInfo];
30
+ /** @type {TypedPattern<TransferRoute>} */
31
+ export const TransferRouteShape: TypedPattern<TransferRoute>;
32
+ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools: VowTools, { chainInfoValueShape }?: {
33
+ chainInfoValueShape?: Pattern;
34
+ }): import("@endo/exo").Guarded<{
35
+ /**
36
+ * Register a new chain. The name will override a name in well known chain
37
+ * names.
38
+ *
39
+ * If a durable zone was not provided, registration will not survive a
40
+ * reincarnation of the vat. Then if the chain is not yet in the well known
41
+ * names at that point, it will have to be registered again. In an unchanged
42
+ * contract `start` the call will happen again naturally.
43
+ *
44
+ * @param {string} name
45
+ * @param {ChainInfo} chainInfo
46
+ */
47
+ registerChain(name: string, chainInfo: ChainInfo): void;
48
+ /**
49
+ * Update chain info by completely replacing existing entry
50
+ *
51
+ * @param {string} chainName - Name of the chain to update
52
+ * @param {ChainInfo} chainInfo - New chain info
53
+ * @throws {Error} If chain not registered
54
+ */
55
+ updateChain(chainName: string, chainInfo: ChainInfo): void;
56
+ /**
57
+ * @template {string} K
58
+ * @param {K} chainName
59
+ * @returns {Vow<ActualChainInfo<K>>}
60
+ */
61
+ getChainInfo<K extends string>(chainName: K): Vow<ActualChainInfo<K>>;
62
+ /**
63
+ * @param {CaipChainId} chainId
64
+ * @returns {ChainInfo}
65
+ */
66
+ getChainInfoByChainId(chainId: CaipChainId): ChainInfo;
67
+ /**
68
+ * Register information for a Cosmos chain
69
+ *
70
+ * @param {string} primaryChainId
71
+ * @param {string} counterpartyChainId
72
+ * @param {IBCConnectionInfo} connectionInfo from primary to counterparty
73
+ */
74
+ registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: IBCConnectionInfo): void;
75
+ /**
76
+ * Update connection info by completely replacing existing entry
77
+ *
78
+ * @param {string} primaryChainId - Cosmos chainId of primary chain
79
+ * @param {string} counterpartyChainId - Cosmos chainId of counterparty
80
+ * chain
81
+ * @param {IBCConnectionInfo} connectionInfo - New connection info
82
+ * @throws {Error} If connection not registered
83
+ */
84
+ updateConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: IBCConnectionInfo): void;
85
+ /**
86
+ * @param {string | { chainId: string }} primary the primary chain
87
+ * @param {string | { chainId: string }} counter the counterparty chain
88
+ * @returns {Vow<IBCConnectionInfo>}
89
+ */
90
+ getConnectionInfo(primary: string | {
91
+ chainId: string;
92
+ }, counter: string | {
93
+ chainId: string;
94
+ }): Vow<IBCConnectionInfo>;
95
+ /**
96
+ * @template {string} C1
97
+ * @template {string} C2
98
+ * @param {C1} primaryName the primary chain name
99
+ * @param {C2} counterName the counterparty chain name
100
+ * @returns {Vow<
101
+ * [ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]
102
+ * >}
103
+ */
104
+ getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]>;
105
+ /**
106
+ * Register an asset that may be held on a chain other than the issuing
107
+ * chain.
108
+ *
109
+ * @param {Denom} denom - on the holding chain, whose name is given in
110
+ * `detail.chainName`
111
+ * @param {DenomDetail} detail - chainName and baseName must be registered
112
+ */
113
+ registerAsset(denom: Denom, detail: DenomDetail): void;
114
+ /**
115
+ * Update asset info by completely replacing existing entry
116
+ *
117
+ * @param {Denom} denom - Denom on the holding chain
118
+ * @param {DenomDetail} detail - New asset details
119
+ * @throws {Error} If asset not registered or referenced chains not
120
+ * registered
121
+ */
122
+ updateAsset(denom: Denom, detail: DenomDetail): void;
123
+ /**
124
+ * Retrieve holding, issuing chain names etc. for a denom.
125
+ *
126
+ * @param {Denom} denom
127
+ * @param {string} srcChainName - the chainName the denom is held on
128
+ * @returns {DenomDetail | undefined}
129
+ */
130
+ getAsset(denom: Denom, srcChainName: string): DenomDetail | undefined;
131
+ /**
132
+ * Retrieve denom (string) for a Brand.
133
+ *
134
+ * @param {Brand} brand
135
+ * @returns {Denom | undefined}
136
+ */
137
+ getDenom(brand: Brand): Denom | undefined;
138
+ /**
139
+ * @param {AccountId | Bech32Address} partialId CAIP-10 account ID or a
140
+ * Cosmos bech32 address
141
+ * @returns {AccountId}
142
+ * @throws {Error} if chain info not found for bech32Prefix
143
+ */
144
+ resolveAccountId(partialId: AccountId | Bech32Address): AccountId;
145
+ /**
146
+ * Like `resolveAccountId` but always returns a CosmosChainAddress.
147
+ *
148
+ * @param {AccountIdArg | Bech32Address} partialId CAIP-10 account ID or a
149
+ * Cosmos bech32 address
150
+ * @returns {CosmosChainAddress}
151
+ * @throws {Error} if chain info not found for bech32Prefix
152
+ */
153
+ coerceCosmosAddress(partialId: AccountIdArg | Bech32Address): CosmosChainAddress;
154
+ /**
155
+ * Determine the IBC transfer route for a destination and amount given the
156
+ * current holding chain.
157
+ *
158
+ * Does not account for routes with more than 1 intermediary hop - that is,
159
+ * it can't unwrap denoms that were incorrectly routed.
160
+ *
161
+ * XXX consider accepting AmountArg #10449
162
+ *
163
+ * @param {AccountIdArg | Bech32Address} destination
164
+ * @param {DenomAmount} denomAmount
165
+ * @param {string} srcChainName
166
+ * @param {IBCMsgTransferOptions['forwardOpts']} [forwardOpts]
167
+ * @returns {TransferRoute} single hop, multi hop
168
+ * @throws {Error} if unable to determine route
169
+ */
170
+ makeTransferRoute(destination: AccountIdArg | Bech32Address, denomAmount: DenomAmount, srcChainName: string, forwardOpts?: IBCMsgTransferOptions["forwardOpts"]): TransferRoute;
171
+ /**
172
+ * Check if the ChainHub is empty (no chains, connections, or assets
173
+ * registered)
174
+ *
175
+ * @returns {boolean}
176
+ */
177
+ isEmpty(): boolean;
178
+ }>;
179
+ export function registerAssets(chainHub: ChainHub, name: string, assets: CosmosAssetInfo[]): void;
180
+ /**
181
+ * If K matches a known chain, narrow the type from generic ChainInfo
182
+ */
183
+ export type ActualChainInfo<K extends string> = K extends keyof KnownChains ? ChainInfo & Omit<KnownChains[K], "connections"> : ChainInfo;
184
+ export type DenomDetail = {
185
+ /**
186
+ * - name of issuing chain; e.g. cosmoshub
187
+ */
188
+ baseName: string;
189
+ /**
190
+ * - e.g. uatom
191
+ */
192
+ baseDenom: Denom;
193
+ /**
194
+ * - name of holding chain; e.g. agoric
195
+ */
196
+ chainName: string;
197
+ /**
198
+ * - vbank brand, if registered
199
+ */
200
+ brand?: Brand<"nat"> | undefined;
201
+ };
202
+ export type IbcConnectionKey = `${string}${"_"}${string}`;
203
+ export type ChainHub = ReturnType<typeof makeChainHub>;
204
+ import type { IBCConnectionInfo } from '../cosmos-api.js';
205
+ import type { TransferRoute } from '../cosmos-api.js';
206
+ import type { TypedPattern } from '@agoric/internal';
207
+ import type { Zone } from '@agoric/zone';
208
+ import type { NameHub } from '@agoric/vats';
209
+ import type { Remote } from '@agoric/internal';
210
+ import type { VowTools } from '@agoric/vow';
211
+ import type { Pattern } from '@endo/patterns';
212
+ import type { ChainInfo } from '../orchestration-api.js';
213
+ import type { Vow } from '@agoric/vow';
214
+ import type { CaipChainId } from '../orchestration-api.js';
215
+ import type { Denom } from '../orchestration-api.js';
216
+ import type { Brand } from '@agoric/ertp';
217
+ import type { AccountId } from '../orchestration-api.js';
218
+ import type { Bech32Address } from '../cosmos-api.js';
219
+ import type { AccountIdArg } from '../orchestration-api.js';
220
+ import type { CosmosChainAddress } from '../orchestration-api.js';
221
+ import type { DenomAmount } from '../orchestration-api.js';
222
+ import type { IBCMsgTransferOptions } from '../cosmos-api.js';
223
+ import type { CosmosAssetInfo } from '../cosmos-api.js';
224
+ import type { KnownChains } from '../chain-info.js';
225
+ //# sourceMappingURL=chain-hub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-hub.d.ts","sourceRoot":"","sources":["chain-hub.js"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ export function prepareCombineInvitationMakers(zone: Zone, ...interfaceGuards: InterfaceGuard[]): <IM extends InvitationMakers[]>(...invitationMakers: IM) => IM[number];
2
+ export type MakeCombineInvitationMakers = ReturnType<typeof prepareCombineInvitationMakers>;
3
+ export type CombinedInvitationMakers = ReturnType<MakeCombineInvitationMakers>;
4
+ import type { Zone } from '@agoric/zone';
5
+ import type { InterfaceGuard } from '@endo/patterns';
6
+ import type { InvitationMakers } from '@agoric/smart-wallet/src/types.js';
7
+ //# sourceMappingURL=combine-invitation-makers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combine-invitation-makers.d.ts","sourceRoot":"","sources":["combine-invitation-makers.js"],"names":[],"mappings":"AAyBO,qDAHI,IAAI,sBACJ,cAAc,EAAE,IAcS,EAAE,SAAtB,gBAAgB,EAAG,uBACtB,EAAE,KACA,EAAE,CAAC,MAAM,CAAC,CAmBxB;0CAEa,UAAU,CAAC,OAAO,8BAA8B,CAAC;uCACjD,UAAU,CAAC,2BAA2B,CAAC;0BApD9B,cAAc;oCACJ,gBAAgB;sCAFd,mCAAmC"}
@@ -0,0 +1,49 @@
1
+ export function prepareCosmosInterchainService(zone: Zone, vowTools: VowTools): (powers: Partial<CosmosOrchestrationPowers>) => import("@endo/exo").Guarded<{
2
+ /**
3
+ * @satisfies {CosmosInterchainService['makeAccount']}
4
+ * @param {string} chainId
5
+ * @param {IBCConnectionID} hostConnectionId the counterparty
6
+ * connection_id
7
+ * @param {IBCConnectionID} controllerConnectionId self connection_id
8
+ * @param {ICAChannelAddressOpts} [opts] optional to configure the
9
+ * channel address, such as version and ordering
10
+ * @returns {Vow<IcaAccount>}
11
+ */
12
+ makeAccount(chainId: string, hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID, opts?: ICAChannelAddressOpts): Vow<IcaAccount>;
13
+ /**
14
+ * @satisfies {CosmosInterchainService['provideICQConnection']}
15
+ * @param {IBCConnectionID} controllerConnectionId
16
+ * @param {string} [version]
17
+ * @returns {Vow<ICQConnection> | ICQConnection}
18
+ */
19
+ provideICQConnection(controllerConnectionId: IBCConnectionID, version?: string): Vow<ICQConnection> | ICQConnection;
20
+ }>;
21
+ export type CosmosOrchestrationPowers = {
22
+ portAllocator: Remote<PortAllocator>;
23
+ /**
24
+ * reserve a state key for future use. can hold
25
+ * an additional power or a record of powers
26
+ */
27
+ reserved: undefined;
28
+ };
29
+ export type ICQConnectionStore = MapStore<string, ICQConnectionKit>;
30
+ export type ConnectionKit = IcaAccountKit | ICQConnectionKit;
31
+ export type OrchestrationState = {
32
+ icqConnections: ICQConnectionStore;
33
+ sharedICQPort: Remote<Port> | undefined;
34
+ } & CosmosOrchestrationPowers;
35
+ export type MakeCosmosInterchainService = ReturnType<typeof prepareCosmosInterchainService>;
36
+ import type { Zone } from '@agoric/base-zone';
37
+ import type { VowTools } from '@agoric/vow';
38
+ import type { IBCConnectionID } from '@agoric/network/ibc';
39
+ import type { ICAChannelAddressOpts } from '../utils/address.js';
40
+ import type { IcaAccount } from '../types.js';
41
+ import type { Vow } from '@agoric/vow';
42
+ import type { ICQConnection } from '../types.js';
43
+ import type { PortAllocator } from '@agoric/network';
44
+ import type { Remote } from '@agoric/internal';
45
+ import type { ICQConnectionKit } from '../types.js';
46
+ import type { MapStore } from '@agoric/store';
47
+ import type { IcaAccountKit } from '../types.js';
48
+ import type { Port } from '@agoric/network';
49
+ //# sourceMappingURL=cosmos-interchain-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosmos-interchain-service.d.ts","sourceRoot":"","sources":["cosmos-interchain-service.js"],"names":[],"mappings":"AAmQO,qDAJI,IAAI,YACJ,QAAQ;IAvEX;;;;;;;;;OASG;yBAPQ,MAAM,oBACN,eAAe,0BAEf,eAAe,SACf,qBAAqB,GAEnB,IAAI,UAAU,CAAC;IAkB5B;;;;;OAKG;iDAHQ,eAAe,YACf,MAAM,GACJ,IAAI,aAAa,CAAC,GAAG,aAAa;GA6DtD;;mBAxPa,OAAO,aAAa,CAAC;;;;;cACrB,SAAS;;iCAIT,SAAS,MAAM,EAAE,gBAAgB,CAAC;4BAElC,aAAa,GAAG,gBAAgB;iCAGjC;IACR,cAAc,EAAE,kBAAkB,CAAC;IACnC,aAAa,EAAE,OAAO,IAAI,CAAC,GAAG,SAAS,CAAC;CACzC,GAAG,yBAAyB;0CA8OlB,UAAU,CAAC,OAAO,8BAA8B,CAAC;0BAxQxC,mBAAmB;8BAKV,aAAa;qCAFO,qBAAqB;2CAIjC,qBAAqB;gCADgB,aAAa;yBAD1D,aAAa;mCACgC,aAAa;mCAJxC,iBAAiB;4BAD1C,kBAAkB;sCAKkC,aAAa;8BAFrD,eAAe;mCAEyB,aAAa;0BAJxC,iBAAiB"}