@agoric/orchestration 0.3.0-u23.0 → 0.3.0-u23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +9 -0
- package/package.json +15 -15
- package/src/axelar-types.d.ts +53 -0
- package/src/axelar-types.d.ts.map +1 -0
- package/src/cctp-chain-info.d.ts +65 -0
- package/src/cctp-chain-info.d.ts.map +1 -0
- package/src/chain-capabilities.d.ts +12 -0
- package/src/chain-capabilities.d.ts.map +1 -0
- package/src/chain-info.d.ts +10267 -0
- package/src/chain-info.d.ts.map +1 -0
- package/src/cosmos-api.d.ts +437 -0
- package/src/cosmos-api.d.ts.map +1 -0
- package/src/ethereum-api.d.ts +9 -0
- package/src/ethereum-api.d.ts.map +1 -0
- package/src/examples/auto-stake-it-tap-kit.d.ts +50 -0
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -0
- package/src/examples/auto-stake-it.contract.d.ts +34 -0
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -0
- package/src/examples/auto-stake-it.flows.d.ts +24 -0
- package/src/examples/auto-stake-it.flows.d.ts.map +1 -0
- package/src/examples/axelar-gmp-account-kit.d.ts +80 -0
- package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -0
- package/src/examples/axelar-gmp.contract.d.ts +52 -0
- package/src/examples/axelar-gmp.contract.d.ts.map +1 -0
- package/src/examples/axelar-gmp.flows.d.ts +21 -0
- package/src/examples/axelar-gmp.flows.d.ts.map +1 -0
- package/src/examples/basic-flows.contract.d.ts +32 -0
- package/src/examples/basic-flows.contract.d.ts.map +1 -0
- package/src/examples/basic-flows.flows.d.ts +20 -0
- package/src/examples/basic-flows.flows.d.ts.map +1 -0
- package/src/examples/send-anywhere.contract.d.ts +60 -0
- package/src/examples/send-anywhere.contract.d.ts.map +1 -0
- package/src/examples/send-anywhere.flows.d.ts +576 -0
- package/src/examples/send-anywhere.flows.d.ts.map +1 -0
- package/src/examples/shared.flows.d.ts +4 -0
- package/src/examples/shared.flows.d.ts.map +1 -0
- package/src/examples/stake-bld.contract.d.ts +237 -0
- package/src/examples/stake-bld.contract.d.ts.map +1 -0
- package/src/examples/stake-ica.contract.d.ts +573 -0
- package/src/examples/stake-ica.contract.d.ts.map +1 -0
- package/src/examples/staking-combinations.contract.d.ts +19 -0
- package/src/examples/staking-combinations.contract.d.ts.map +1 -0
- package/src/examples/staking-combinations.flows.d.ts +32 -0
- package/src/examples/staking-combinations.flows.d.ts.map +1 -0
- package/src/examples/swap-anything.contract.d.ts +55 -0
- package/src/examples/swap-anything.contract.d.ts.map +1 -0
- package/src/examples/swap-anything.flows.d.ts +32 -0
- package/src/examples/swap-anything.flows.d.ts.map +1 -0
- package/src/examples/swap.contract.d.ts +56 -0
- package/src/examples/swap.contract.d.ts.map +1 -0
- package/src/examples/swap.flows.d.ts +12 -0
- package/src/examples/swap.flows.d.ts.map +1 -0
- package/src/examples/unbond.contract.d.ts +21 -0
- package/src/examples/unbond.contract.d.ts.map +1 -0
- package/src/examples/unbond.flows.d.ts +6 -0
- package/src/examples/unbond.flows.d.ts.map +1 -0
- package/src/exos/chain-hub-admin.d.ts +27 -0
- package/src/exos/chain-hub-admin.d.ts.map +1 -0
- package/src/exos/chain-hub.d.ts +225 -0
- package/src/exos/chain-hub.d.ts.map +1 -0
- package/src/exos/combine-invitation-makers.d.ts +7 -0
- package/src/exos/combine-invitation-makers.d.ts.map +1 -0
- package/src/exos/cosmos-interchain-service.d.ts +49 -0
- package/src/exos/cosmos-interchain-service.d.ts.map +1 -0
- package/src/exos/cosmos-orchestration-account.d.ts +950 -0
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
- package/src/exos/exo-interfaces.d.ts +27 -0
- package/src/exos/exo-interfaces.d.ts.map +1 -0
- package/src/exos/ibc-packet.d.ts +101 -0
- package/src/exos/ibc-packet.d.ts.map +1 -0
- package/src/exos/ica-account-kit.d.ts +98 -0
- package/src/exos/ica-account-kit.d.ts.map +1 -0
- package/src/exos/icq-connection-kit.d.ts +67 -0
- package/src/exos/icq-connection-kit.d.ts.map +1 -0
- package/src/exos/local-chain-facade.d.ts +1587 -0
- package/src/exos/local-chain-facade.d.ts.map +1 -0
- package/src/exos/local-orchestration-account.d.ts +405 -0
- package/src/exos/local-orchestration-account.d.ts.map +1 -0
- package/src/exos/orchestrator.d.ts +35857 -0
- package/src/exos/orchestrator.d.ts.map +1 -0
- package/src/exos/packet-tools.d.ts +63 -0
- package/src/exos/packet-tools.d.ts.map +1 -0
- package/src/exos/portfolio-holder-kit.d.ts +154 -0
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -0
- package/src/exos/remote-chain-facade.d.ts +1549 -0
- package/src/exos/remote-chain-facade.d.ts.map +1 -0
- package/src/facade.d.ts +33 -0
- package/src/facade.d.ts.map +1 -0
- package/src/fetched-chain-info.d.ts +10275 -0
- package/src/fetched-chain-info.d.ts.map +1 -0
- package/src/fixtures/query-flows.contract.d.ts +33 -0
- package/src/fixtures/query-flows.contract.d.ts.map +1 -0
- package/src/fixtures/query-flows.flows.d.ts +20 -0
- package/src/fixtures/query-flows.flows.d.ts.map +1 -0
- package/src/orchestration-api.d.ts +315 -0
- package/src/orchestration-api.d.ts.map +1 -0
- package/src/typeGuards.d.ts +163 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/types.d.ts +25 -0
- package/src/types.d.ts.map +1 -0
- package/src/utils/abitype.d.ts +6 -0
- package/src/utils/abitype.d.ts.map +1 -0
- package/src/utils/address.d.ts +44 -0
- package/src/utils/address.d.ts.map +1 -0
- package/src/utils/agd-lib.d.ts +58 -0
- package/src/utils/agd-lib.d.ts.map +1 -0
- package/src/utils/amounts.d.ts +11 -0
- package/src/utils/amounts.d.ts.map +1 -0
- package/src/utils/asset.d.ts +6 -0
- package/src/utils/asset.d.ts.map +1 -0
- package/src/utils/axelar-static-config.d.ts +34 -0
- package/src/utils/axelar-static-config.d.ts.map +1 -0
- package/src/utils/chain-hub-helper.d.ts +14 -0
- package/src/utils/chain-hub-helper.d.ts.map +1 -0
- package/src/utils/chain-info.d.ts +5 -0
- package/src/utils/chain-info.d.ts.map +1 -0
- package/src/utils/codecs.d.ts +145 -0
- package/src/utils/codecs.d.ts.map +1 -0
- package/src/utils/cosmos.d.ts +61 -0
- package/src/utils/cosmos.d.ts.map +1 -0
- package/src/utils/denomHash.d.ts +7 -0
- package/src/utils/denomHash.d.ts.map +1 -0
- package/src/utils/exo-helpers.d.ts +156 -0
- package/src/utils/exo-helpers.d.ts.map +1 -0
- package/src/utils/gmp.d.ts +30 -0
- package/src/utils/gmp.d.ts.map +1 -0
- package/src/utils/orc.d.ts +17 -0
- package/src/utils/orc.d.ts.map +1 -0
- package/src/utils/orchestrationAccount.d.ts +91 -0
- package/src/utils/orchestrationAccount.d.ts.map +1 -0
- package/src/utils/packet.d.ts +57 -0
- package/src/utils/packet.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransfer.d.ts +221 -0
- package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
- package/src/utils/permit2.d.ts +11 -0
- package/src/utils/permit2.d.ts.map +1 -0
- package/src/utils/progress.d.ts +41 -0
- package/src/utils/progress.d.ts.map +1 -0
- package/src/utils/registry.d.ts +6 -0
- package/src/utils/registry.d.ts.map +1 -0
- package/src/utils/start-helper.d.ts +129 -0
- package/src/utils/start-helper.d.ts.map +1 -0
- package/src/utils/time.d.ts +38 -0
- package/src/utils/time.d.ts.map +1 -0
- package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
- package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
- package/src/utils/viem-utils/types.d.ts +6 -0
- package/src/utils/viem-utils/types.d.ts.map +1 -0
- package/src/utils/viem.d.ts +11 -0
- package/src/utils/viem.d.ts.map +1 -0
- package/src/utils/zcf-tools.d.ts +19 -0
- package/src/utils/zcf-tools.d.ts.map +1 -0
- package/src/utils/zoe-tools.d.ts +19 -0
- package/src/utils/zoe-tools.d.ts.map +1 -0
- package/src/vat-orchestration.d.ts +21 -0
- package/src/vat-orchestration.d.ts.map +1 -0
- package/tools/contract-tests.d.ts +1832 -0
- package/tools/contract-tests.d.ts.map +1 -0
- package/tools/ibc-mock-fixtures.d.ts +49 -0
- package/tools/ibc-mock-fixtures.d.ts.map +1 -0
- package/tools/ibc-mocks.d.ts +168 -0
- package/tools/ibc-mocks.d.ts.map +1 -0
- package/tools/make-test-address.d.ts +3 -0
- package/tools/make-test-address.d.ts.map +1 -0
- package/tools/network-fakes.d.ts +143 -0
- package/tools/network-fakes.d.ts.map +1 -0
- package/tools/protobuf-decoder.d.ts +19 -0
- package/tools/protobuf-decoder.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-tests.d.ts","sourceRoot":"","sources":["contract-tests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAE3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAS/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAmBtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAQpE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAU,kBAG1C;IACD,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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2BAcS,YAAY;;;;;;;;;EAmGrD,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO: provide mappings to cosmos error codes (and module specific error codes)
|
|
3
|
+
* see https://github.com/Agoric/agoric-sdk/issues/9629 for more details about
|
|
4
|
+
* error messages over ibc
|
|
5
|
+
*/
|
|
6
|
+
export declare const errorAcknowledgments: {
|
|
7
|
+
error5: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const UNBOND_PERIOD_SECONDS = 5n;
|
|
10
|
+
export declare const protoMsgMocks: {
|
|
11
|
+
delegate: {
|
|
12
|
+
msg: string;
|
|
13
|
+
ack: string;
|
|
14
|
+
};
|
|
15
|
+
undelegate: {
|
|
16
|
+
msg: string;
|
|
17
|
+
ack: string;
|
|
18
|
+
};
|
|
19
|
+
redelegate: {
|
|
20
|
+
msg: string;
|
|
21
|
+
ack: string;
|
|
22
|
+
};
|
|
23
|
+
withdrawReward: {
|
|
24
|
+
msg: string;
|
|
25
|
+
ack: string;
|
|
26
|
+
};
|
|
27
|
+
queryBalance: {
|
|
28
|
+
msg: string;
|
|
29
|
+
ack: string;
|
|
30
|
+
};
|
|
31
|
+
bankSend: {
|
|
32
|
+
msg: string;
|
|
33
|
+
ack: string;
|
|
34
|
+
};
|
|
35
|
+
bankSendMulti: {
|
|
36
|
+
msg: string;
|
|
37
|
+
ack: string;
|
|
38
|
+
};
|
|
39
|
+
depositForBurn: {
|
|
40
|
+
msg: string;
|
|
41
|
+
ack: string;
|
|
42
|
+
};
|
|
43
|
+
depositForBurnForBase: {
|
|
44
|
+
msg: string;
|
|
45
|
+
ack: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const defaultMockAckMap: Record<string, string>;
|
|
49
|
+
//# sourceMappingURL=ibc-mock-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ibc-mock-fixtures.d.ts","sourceRoot":"","sources":["ibc-mock-fixtures.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;CAIhC,CAAC;AAiCF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAOxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CACpB,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/** @file Tools to support making IBC mocks */
|
|
2
|
+
import { type JsonSafe, type Proto3Codec } from '@agoric/cosmic-proto';
|
|
3
|
+
import { Any as AnyType } from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
4
|
+
import type { PacketSDKType } from '@agoric/cosmic-proto/ibc/core/channel/v1/channel.js';
|
|
5
|
+
import { type RequestQuery as RequestQueryType, ResponseQuery as ResponseQueryType } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
6
|
+
import type { IBCChannelID } from '@agoric/network/ibc';
|
|
7
|
+
import type { IBCEvent, VTransferIBCEvent } from '@agoric/vats';
|
|
8
|
+
import type { CosmosChainAddress, Denom } from '../src/orchestration-api.js';
|
|
9
|
+
type EncoderCommon<T> = T extends Proto3Codec<infer TU> ? Proto3Codec<TU> : Proto3Codec<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Build a response "packet bytes string" we'd expect to see from a
|
|
12
|
+
* Response to a Tx carrying a single Msg.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use `buildTxResponseString([{ encoder, message }])` instead.
|
|
15
|
+
* @param encoder
|
|
16
|
+
* @param message
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildMsgResponseString<T>(encoder: EncoderCommon<T>, message: Partial<T>): string;
|
|
19
|
+
type EncoderMessage<T> = {
|
|
20
|
+
encoder: EncoderCommon<T>;
|
|
21
|
+
message: Partial<T>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @param messages
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildTxResponseString<T extends EncoderMessage<any>[]>(messages: T): string;
|
|
27
|
+
/**
|
|
28
|
+
* Build an example error packet for a failed Tx Msg
|
|
29
|
+
* @param msg
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildMsgErrorString(msg?: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Build a response "packet bytes string" we'd expect to see from a single Query
|
|
34
|
+
* request
|
|
35
|
+
*
|
|
36
|
+
* @deprecated Use `buildQueriesResponseString([{ encoder, query, opts }])` instead.
|
|
37
|
+
*
|
|
38
|
+
* @param encoder
|
|
39
|
+
* @param query
|
|
40
|
+
* @param opts
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildQueryResponseString<T>(encoder: EncoderCommon<T>, query: Partial<T>, opts?: Partial<Omit<ResponseQueryType, 'key'>>): string;
|
|
43
|
+
/**
|
|
44
|
+
* Build a response "packet bytes string" we'd expect to see from
|
|
45
|
+
* the Responses corresponding to multiple Queries.
|
|
46
|
+
* @param queries
|
|
47
|
+
* @returns {string} base64 encoded string of the response packet
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildQueriesResponseString<T extends {
|
|
50
|
+
encoder: EncoderCommon<any>;
|
|
51
|
+
query: Partial<any>;
|
|
52
|
+
opts?: Partial<Omit<ResponseQueryType, 'key'>>;
|
|
53
|
+
}[]>(queries: T): string;
|
|
54
|
+
/**
|
|
55
|
+
* Build a tx packet string for the mocked dibc bridge handler
|
|
56
|
+
* @param msgs
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
export declare function buildTxPacketString(msgs: {
|
|
60
|
+
value: Uint8Array;
|
|
61
|
+
typeUrl: string;
|
|
62
|
+
}[]): string;
|
|
63
|
+
/**
|
|
64
|
+
* Parse an outgoing ica tx packet. Useful for testing when inspecting
|
|
65
|
+
* outgoing dibc bridge messages.
|
|
66
|
+
*
|
|
67
|
+
* @param b64 base64 encoded string
|
|
68
|
+
*/
|
|
69
|
+
export declare const parseOutgoingTxPacket: (b64: string) => import("@agoric/cosmic-proto").MessageBody<"/cosmos.tx.v1beta1.TxBody">;
|
|
70
|
+
/**
|
|
71
|
+
* Build a query packet string for the mocked dibc bridge handler
|
|
72
|
+
* @param msgs
|
|
73
|
+
* @param opts
|
|
74
|
+
* @returns {string}
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildQueryPacketString(msgs: AnyType[], opts?: Partial<Omit<RequestQueryType, 'path' | 'data'>>): string;
|
|
77
|
+
/**
|
|
78
|
+
* Fields that are common to every vtransfer IBC event.
|
|
79
|
+
*/
|
|
80
|
+
type BuildVTransferEventBaseParams = {
|
|
81
|
+
/**
|
|
82
|
+
* defaults to `cosmos1AccAddress` – set to `agoric1fakeLCAAddress` to
|
|
83
|
+
* simulate an outgoing transfer.
|
|
84
|
+
*/
|
|
85
|
+
sender?: CosmosChainAddress['value'] | string;
|
|
86
|
+
/**
|
|
87
|
+
* defaults to `agoric1fakeLCAAddress` – set differently to simulate
|
|
88
|
+
* an outgoing transfer.
|
|
89
|
+
*/
|
|
90
|
+
receiver?: CosmosChainAddress['value'] | string;
|
|
91
|
+
target?: CosmosChainAddress['value'] | string;
|
|
92
|
+
amount?: bigint;
|
|
93
|
+
denom?: Denom;
|
|
94
|
+
destinationChannel?: IBCChannelID;
|
|
95
|
+
sourceChannel?: IBCChannelID;
|
|
96
|
+
/** supports `bigint` or `string` so tests can pass encoded numbers */
|
|
97
|
+
sequence?: PacketSDKType['sequence'] | JsonSafe<PacketSDKType['sequence']>;
|
|
98
|
+
memo?: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Parameters allowed for the ACK-carrying events.
|
|
102
|
+
*/
|
|
103
|
+
type VTransferAckParams = BuildVTransferEventBaseParams & {
|
|
104
|
+
event?: 'acknowledgementPacket' | 'writeAcknowledgement';
|
|
105
|
+
/**
|
|
106
|
+
* if present, helper encodes `{ error: acknowledgementError }`
|
|
107
|
+
* instead of the success result
|
|
108
|
+
*/
|
|
109
|
+
acknowledgementError?: string;
|
|
110
|
+
/** override the default `"agoric123"` relayer address */
|
|
111
|
+
relayer?: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Parameters allowed for a timeout event (no ack/relayer).
|
|
115
|
+
*/
|
|
116
|
+
type VTransferTimeoutParams = BuildVTransferEventBaseParams & {
|
|
117
|
+
event: 'timeoutPacket';
|
|
118
|
+
acknowledgementError?: never;
|
|
119
|
+
relayer?: never;
|
|
120
|
+
};
|
|
121
|
+
type VTransferParams = VTransferAckParams | VTransferTimeoutParams;
|
|
122
|
+
/** helper to turn param object into correct return */
|
|
123
|
+
type ExtractEvent<P> = P extends {
|
|
124
|
+
event: infer Ev;
|
|
125
|
+
} ? Ev extends undefined ? 'acknowledgementPacket' : Ev : 'acknowledgementPacket';
|
|
126
|
+
type BuildVTransferEventResult<P extends VTransferParams> = VTransferByEvent<ExtractEvent<P>>;
|
|
127
|
+
type VTransferByEvent<E extends VTransferIBCEvent['event']> = Extract<VTransferIBCEvent, {
|
|
128
|
+
event: E;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* `buildVTransferEvent` can be used with `transferBridge` to simulate incoming
|
|
132
|
+
* and outgoing IBC fungible tokens transfers to a LocalChain account.
|
|
133
|
+
*
|
|
134
|
+
* It defaults to simulating incoming transfers. To simulate an outgoing one,
|
|
135
|
+
* ensure `sender=agoric1fakeLCAAddress` and this after LocalChainBridge
|
|
136
|
+
* receives the outgoing MsgTransfer,
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```js
|
|
140
|
+
* const { mocks: { transferBridge } = await commonSetup(t);
|
|
141
|
+
* await E(transferBridge).fromBridge(
|
|
142
|
+
* buildVTransferEvent({
|
|
143
|
+
* receiver: 'agoric1fakeLCAAddress',
|
|
144
|
+
* amount: 10n,
|
|
145
|
+
* denom: 'uatom',
|
|
146
|
+
* }),
|
|
147
|
+
* );
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* XXX integrate vlocalchain and vtransfer ScopedBridgeManagers
|
|
151
|
+
* in test supports.
|
|
152
|
+
*/
|
|
153
|
+
export declare function buildVTransferEvent<P extends VTransferParams>(params: P): BuildVTransferEventResult<P>;
|
|
154
|
+
export declare function createMockAckMap(mockMap: Record<string, {
|
|
155
|
+
msg: string;
|
|
156
|
+
ack: string;
|
|
157
|
+
}>): {};
|
|
158
|
+
/**
|
|
159
|
+
* Simulate an IBC channelCloseConfirm event. This can be used to simulate an
|
|
160
|
+
* ICA channel closing for an unexpected reason from a remote chain, _or
|
|
161
|
+
* anything besides the Connection holder calling `.close()`_. If `close()` is
|
|
162
|
+
* called, we'd instead expect to see a Downcall for channelCloseInit.
|
|
163
|
+
*
|
|
164
|
+
* @param {Pick<IBCEvent<'channelCloseConfirm'>, 'portID' | 'channelID'>} event
|
|
165
|
+
*/
|
|
166
|
+
export declare const buildChannelCloseConfirmEvent: ({ channelID, portID, }?: Partial<IBCEvent<"channelCloseConfirm">>) => Partial<IBCEvent<"channelCloseConfirm">>;
|
|
167
|
+
export {};
|
|
168
|
+
//# sourceMappingURL=ibc-mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ibc-mocks.d.ts","sourceRoot":"","sources":["ibc-mocks.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAEzF,OAAO,EACL,KAAK,YAAY,IAAI,gBAAgB,EACrC,aAAa,IAAI,iBAAiB,EACnC,MAAM,+CAA+C,CAAC;AAKvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAa,iBAAiB,EAAE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N,MAAM,eACN,MAAM,GACJ,aAAa,CAazB;mCApB+B,sBAAsB"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { VowTools } from '@agoric/vow';
|
|
2
|
+
import type { IBCChannelID } from '@agoric/network/ibc';
|
|
3
|
+
import type { Zone } from '@agoric/zone';
|
|
4
|
+
import type { IBCMethod, IBCEvent, ScopedBridgeManagerMethods } from '@agoric/vats';
|
|
5
|
+
import type { Guarded } from '@endo/exo';
|
|
6
|
+
type ImplementedIBCEvents = 'channelOpenAck' | 'acknowledgementPacket';
|
|
7
|
+
export declare const ibcBridgeMocks: {
|
|
8
|
+
[T in ImplementedIBCEvents]: T extends 'channelOpenAck' ? (obj: IBCMethod<'startChannelOpenInit'>, opts: {
|
|
9
|
+
channelID: IBCChannelID;
|
|
10
|
+
counterpartyChannelID: IBCChannelID;
|
|
11
|
+
mockChainAddress: string;
|
|
12
|
+
}) => IBCEvent<'channelOpenAck'> : T extends 'acknowledgementPacket' ? (obj: IBCMethod<'sendPacket'>, opts: {
|
|
13
|
+
sequence: bigint;
|
|
14
|
+
acknowledgement: string;
|
|
15
|
+
}) => IBCEvent<'acknowledgementPacket'> : never;
|
|
16
|
+
};
|
|
17
|
+
type BridgeEvents = Array<IBCEvent<'channelOpenAck'> | IBCEvent<'acknowledgementPacket'> | IBCEvent<'channelCloseConfirm'> | IBCEvent<'sendPacket'>>;
|
|
18
|
+
type BridgeDowncalls = Array<IBCMethod<'startChannelOpenInit'> | IBCMethod<'startChannelCloseInit'> | IBCMethod<'bindPort'> | IBCMethod<'sendPacket'>>;
|
|
19
|
+
/**
|
|
20
|
+
* Make a fake IBC Bridge, extended from the dibc ScopedBridgeManager.
|
|
21
|
+
*
|
|
22
|
+
* Has extra `setMockAck` and `setAddressPrefix` methods.
|
|
23
|
+
*
|
|
24
|
+
* @param zone
|
|
25
|
+
*/
|
|
26
|
+
export declare const makeFakeIBCBridge: (zone: Zone) => Guarded<ScopedBridgeManagerMethods<"dibc"> & {
|
|
27
|
+
addMockAck: (msgData: string, ackData: string) => void;
|
|
28
|
+
setMockAck: (mockAckMap: Record<string, string>) => void;
|
|
29
|
+
setAddressPrefix: (addressPrefix: string) => void;
|
|
30
|
+
inspectDibcBridge: () => {
|
|
31
|
+
bridgeEvents: BridgeEvents;
|
|
32
|
+
bridgeDowncalls: BridgeDowncalls;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export declare const setupFakeNetwork: (zone: Zone, { vowTools }: {
|
|
36
|
+
vowTools: VowTools;
|
|
37
|
+
}) => {
|
|
38
|
+
portAllocator: Guarded<{
|
|
39
|
+
allocateCustomIBCPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
40
|
+
allocateICAControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
41
|
+
allocateICQControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
42
|
+
allocateCustomLocalPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
43
|
+
}>;
|
|
44
|
+
protocol: Guarded<{
|
|
45
|
+
registerProtocolHandler(paths: string[], protocolHandler: import("@agoric/vow").Remote<import("@agoric/network").ProtocolHandler>): void;
|
|
46
|
+
unregisterProtocolHandler(prefix: string, protocolHandler: import("@agoric/vow").Remote<import("@agoric/network").ProtocolHandler>): void;
|
|
47
|
+
bindPort(localAddr: import("@agoric/network").Endpoint): Promise<import("@agoric/network").Port | import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
48
|
+
}>;
|
|
49
|
+
ibcBridge: Guarded<ScopedBridgeManagerMethods<"dibc"> & {
|
|
50
|
+
addMockAck: (msgData: string, ackData: string) => void;
|
|
51
|
+
setMockAck: (mockAckMap: Record<string, string>) => void;
|
|
52
|
+
setAddressPrefix: (addressPrefix: string) => void;
|
|
53
|
+
inspectDibcBridge: () => {
|
|
54
|
+
bridgeEvents: BridgeEvents;
|
|
55
|
+
bridgeDowncalls: BridgeDowncalls;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
networkVat: {
|
|
59
|
+
registerProtocolHandler: (prefixes: any, handler: any) => void;
|
|
60
|
+
makeLoopbackProtocolHandler: (instancePrefix?: string) => Guarded<{
|
|
61
|
+
onCreate(_impl: any, _protocolHandler: any): Promise<void>;
|
|
62
|
+
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
63
|
+
onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
64
|
+
onConnect(_port: any, localAddr: import("@agoric/network").Endpoint, remoteAddr: import("@agoric/network").Endpoint): import("@agoric/vow").PromiseVow<import("@agoric/network").AttemptDescription>;
|
|
65
|
+
onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
|
|
66
|
+
onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
|
|
67
|
+
onListenRemove(port: import("@agoric/vow").Remote<import("@agoric/network").Port>, localAddr: import("@agoric/network").Endpoint, listenHandler: import("@agoric/vow").Remote<import("@agoric/network").ListenHandler>, _protocolHandler: any): Promise<void>;
|
|
68
|
+
onRevoke(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
69
|
+
}>;
|
|
70
|
+
makeEchoConnectionKit: () => import("@endo/exo").GuardedKit<{
|
|
71
|
+
handler: {
|
|
72
|
+
onReceive(_connection: import("@agoric/network").Connection, bytes: import("@agoric/network").Bytes, _connectionHandler: import("@agoric/network").ConnectionHandler): Promise<string>;
|
|
73
|
+
onClose(_connection: import("@agoric/network").Connection, reason?: import("@agoric/network").CloseReason, _connectionHandler?: import("@agoric/network").ConnectionHandler): Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
listener: {
|
|
76
|
+
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
|
|
77
|
+
onReceive(_connection: import("@agoric/network").Connection, bytes: import("@agoric/network").Bytes, _connectionHandler: import("@agoric/network").ConnectionHandler): Promise<string>;
|
|
78
|
+
onClose(_connection: import("@agoric/network").Connection, reason?: import("@agoric/network").CloseReason, _connectionHandler?: import("@agoric/network").ConnectionHandler): Promise<void>;
|
|
79
|
+
}>>;
|
|
80
|
+
onListen(port: any, _listenHandler: any): Promise<void>;
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
unregisterProtocolHandler: (prefix: any, handler: any) => void;
|
|
84
|
+
getPortAllocator: () => Guarded<{
|
|
85
|
+
allocateCustomIBCPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
86
|
+
allocateICAControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
87
|
+
allocateICQControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
88
|
+
allocateCustomLocalPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
89
|
+
}>;
|
|
90
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
91
|
+
registerProtocolHandler: (prefixes: any, handler: any) => void;
|
|
92
|
+
makeLoopbackProtocolHandler: (instancePrefix?: string) => Guarded<{
|
|
93
|
+
onCreate(_impl: any, _protocolHandler: any): Promise<void>;
|
|
94
|
+
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
95
|
+
onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
96
|
+
onConnect(_port: any, localAddr: import("@agoric/network").Endpoint, remoteAddr: import("@agoric/network").Endpoint): import("@agoric/vow").PromiseVow<import("@agoric/network").AttemptDescription>;
|
|
97
|
+
onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
|
|
98
|
+
onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
|
|
99
|
+
onListenRemove(port: import("@agoric/vow").Remote<import("@agoric/network").Port>, localAddr: import("@agoric/network").Endpoint, listenHandler: import("@agoric/vow").Remote<import("@agoric/network").ListenHandler>, _protocolHandler: any): Promise<void>;
|
|
100
|
+
onRevoke(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
101
|
+
}>;
|
|
102
|
+
makeEchoConnectionKit: () => import("@endo/exo").GuardedKit<{
|
|
103
|
+
handler: {
|
|
104
|
+
onReceive(_connection: import("@agoric/network").Connection, bytes: import("@agoric/network").Bytes, _connectionHandler: import("@agoric/network").ConnectionHandler): Promise<string>;
|
|
105
|
+
onClose(_connection: import("@agoric/network").Connection, reason?: import("@agoric/network").CloseReason, _connectionHandler?: import("@agoric/network").ConnectionHandler): Promise<void>;
|
|
106
|
+
};
|
|
107
|
+
listener: {
|
|
108
|
+
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
|
|
109
|
+
onReceive(_connection: import("@agoric/network").Connection, bytes: import("@agoric/network").Bytes, _connectionHandler: import("@agoric/network").ConnectionHandler): Promise<string>;
|
|
110
|
+
onClose(_connection: import("@agoric/network").Connection, reason?: import("@agoric/network").CloseReason, _connectionHandler?: import("@agoric/network").ConnectionHandler): Promise<void>;
|
|
111
|
+
}>>;
|
|
112
|
+
onListen(port: any, _listenHandler: any): Promise<void>;
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
115
|
+
unregisterProtocolHandler: (prefix: any, handler: any) => void;
|
|
116
|
+
getPortAllocator: () => Guarded<{
|
|
117
|
+
allocateCustomIBCPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
118
|
+
allocateICAControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
119
|
+
allocateICQControllerPort(): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
120
|
+
allocateCustomLocalPort(specifiedName?: string): Promise<import("@agoric/vow").Vow<import("@agoric/network").Port>>;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
123
|
+
ibcVat: {
|
|
124
|
+
makeCallbacks: (dibcBridgeManager: import("@agoric/vats").ScopedBridgeManager<"dibc">) => Guarded<{
|
|
125
|
+
downcall(method: string, obj: any): Promise<any>;
|
|
126
|
+
}>;
|
|
127
|
+
createHandlers(callbacks: any): {
|
|
128
|
+
protocolHandler: import("@agoric/network").ProtocolHandler;
|
|
129
|
+
bridgeHandler: import("@agoric/vats").BridgeHandler;
|
|
130
|
+
};
|
|
131
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
132
|
+
makeCallbacks: (dibcBridgeManager: import("@agoric/vats").ScopedBridgeManager<"dibc">) => Guarded<{
|
|
133
|
+
downcall(method: string, obj: any): Promise<any>;
|
|
134
|
+
}>;
|
|
135
|
+
createHandlers(callbacks: any): {
|
|
136
|
+
protocolHandler: import("@agoric/network").ProtocolHandler;
|
|
137
|
+
bridgeHandler: import("@agoric/vats").BridgeHandler;
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
setupIBCProtocol: () => Promise<void>;
|
|
141
|
+
};
|
|
142
|
+
export {};
|
|
143
|
+
//# sourceMappingURL=network-fakes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-fakes.d.ts","sourceRoot":"","sources":["network-fakes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAS5C,OAAO,KAAK,EACV,YAAY,EAGb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCzC,KAAK,oBAAoB,GAAG,gBAAgB,GAAG,uBAAuB,CAAC;AAEvE,eAAO,M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,YAAY,CAAC;QAC3B,eAAe,EAAE,eAAe,CAAC;KAClC,CAAC;CACH,CAiKF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,MAAM,IAAI,EACV,cAAc;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE;;;;;;;;;;;;;oBA5KtB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI;oBAC1C,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI;0BACtC,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI;2BAC9B,MAAM;YACvB,YAAY,EAAE,YAAY,CAAC;YAC3B,eAAe,EAAE,eAAe,CAAC;SAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2NJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decodes a protobuf message from the given buffer.
|
|
3
|
+
*
|
|
4
|
+
* @param {Buffer} buffer
|
|
5
|
+
*/
|
|
6
|
+
export function decodeProtobuf(buffer: Buffer): {
|
|
7
|
+
value: {};
|
|
8
|
+
bytesRead: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Decodes a protobuf message from the given base64-encoded data.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} base64String
|
|
14
|
+
*/
|
|
15
|
+
export function decodeProtobufBase64(base64String: string): {
|
|
16
|
+
value: {};
|
|
17
|
+
bytesRead: number;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=protobuf-decoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf-decoder.d.ts","sourceRoot":"","sources":["protobuf-decoder.js"],"names":[],"mappings":"AA8HA;;;;GAIG;AACH,uCAFW,MAAM;;;EAchB;AACD;;;;GAIG;AACH,mDAFW,MAAM;;;EAKhB"}
|