@agoric/orchestration 0.1.1-dev-e26d66b.0 → 0.1.1-dev-0239c3e.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.
- package/package.json +7 -4
- package/src/axelar-types.d.ts +50 -0
- package/src/axelar-types.d.ts.map +1 -0
- package/src/axelar-types.js +75 -0
- package/src/chain-info.d.ts +1000 -83
- package/src/chain-info.d.ts.map +1 -1
- package/src/examples/axelar-gmp-account-kit.d.ts +67 -0
- package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -0
- package/src/examples/axelar-gmp-account-kit.js +361 -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.contract.js +93 -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/axelar-gmp.flows.js +156 -0
- package/src/exos/orchestrator.d.ts +2 -2
- package/src/fetched-chain-info.d.ts +1497 -578
- package/src/fetched-chain-info.js +996 -82
- package/src/proposals/start-axelar-gmp.js +153 -0
- package/src/utils/agd-lib.d.ts +109 -0
- package/src/utils/agd-lib.d.ts.map +1 -0
- package/src/utils/agd-lib.js +167 -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/axelar-static-config.js +41 -0
- package/src/utils/gmp.d.ts +61 -0
- package/src/utils/gmp.d.ts.map +1 -0
- package/src/utils/gmp.js +113 -0
- package/tools/contract-tests.d.ts +36 -0
- package/tools/contract-tests.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-0239c3e.0+0239c3e",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"node": ">=14.15.0"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"esbuild:axelar": "esbuild ./src/examples/axelar-gmp.contract.js --platform=node --format=esm --bundle --outfile=dist/axelar-gmp.contract.bundle.js",
|
|
13
|
+
"build": "yarn esbuild:axelar",
|
|
13
14
|
"codegen": "scripts/fetch-chain-info.ts",
|
|
14
15
|
"prepack": "yarn run -T tsc --build tsconfig.build.json",
|
|
15
16
|
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
|
|
@@ -54,7 +55,9 @@
|
|
|
54
55
|
"@endo/marshal": "^1.6.4",
|
|
55
56
|
"@endo/patterns": "^1.5.0",
|
|
56
57
|
"@noble/hashes": "^1.5.0",
|
|
57
|
-
"bs58": "^6.0.0"
|
|
58
|
+
"bs58": "^6.0.0",
|
|
59
|
+
"esbuild": "^0.25.2",
|
|
60
|
+
"viem": "^2.31.0"
|
|
58
61
|
},
|
|
59
62
|
"devDependencies": {
|
|
60
63
|
"@agoric/swingset-liveslots": "workspace:*",
|
|
@@ -100,5 +103,5 @@
|
|
|
100
103
|
"typeCoverage": {
|
|
101
104
|
"atLeast": 97.7
|
|
102
105
|
},
|
|
103
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "0239c3edfc2cde40adbc11bdfc5b11e18f561ed9"
|
|
104
107
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export namespace AxelarGMPMessageType {
|
|
2
|
+
let ContractCall: number;
|
|
3
|
+
let ContractCallWithToken: number;
|
|
4
|
+
let TokenTransfer: number;
|
|
5
|
+
}
|
|
6
|
+
export type GMPMessageType = (typeof AxelarGMPMessageType)[keyof typeof AxelarGMPMessageType];
|
|
7
|
+
export type AxelarGmpIncomingMemo = {
|
|
8
|
+
source_chain: string;
|
|
9
|
+
source_address: string;
|
|
10
|
+
payload: string;
|
|
11
|
+
type: GMPMessageType;
|
|
12
|
+
};
|
|
13
|
+
export type AxelarFeeObject = {
|
|
14
|
+
amount: string;
|
|
15
|
+
recipient: Bech32Address;
|
|
16
|
+
};
|
|
17
|
+
export type AxelarGmpOutgoingMemo = {
|
|
18
|
+
destination_chain: string;
|
|
19
|
+
destination_address: string;
|
|
20
|
+
payload: number[] | null;
|
|
21
|
+
type: GMPMessageType;
|
|
22
|
+
fee?: AxelarFeeObject | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type EvmTapState = {
|
|
25
|
+
localAccount: OrchestrationAccount<{
|
|
26
|
+
chainId: "agoric";
|
|
27
|
+
}>;
|
|
28
|
+
localChainAddress: CosmosChainAddress;
|
|
29
|
+
sourceChannel: IBCChannelID;
|
|
30
|
+
localDenom: Denom;
|
|
31
|
+
assets: any;
|
|
32
|
+
remoteChainInfo: any;
|
|
33
|
+
};
|
|
34
|
+
export type ContractCall = {
|
|
35
|
+
target: `0x${string}`;
|
|
36
|
+
functionSignature: string;
|
|
37
|
+
args: unknown[];
|
|
38
|
+
};
|
|
39
|
+
export type AbiEncodedContractCall = {
|
|
40
|
+
target: `0x${string}`;
|
|
41
|
+
data: `0x${string}`;
|
|
42
|
+
};
|
|
43
|
+
export type SupportedDestinationChains = keyof typeof EVM_CHAINS;
|
|
44
|
+
import type { Bech32Address } from '@agoric/orchestration';
|
|
45
|
+
import type { OrchestrationAccount } from '@agoric/orchestration';
|
|
46
|
+
import type { CosmosChainAddress } from '@agoric/orchestration';
|
|
47
|
+
import type { IBCChannelID } from '@agoric/vats';
|
|
48
|
+
import type { Denom } from '@agoric/orchestration';
|
|
49
|
+
import type { EVM_CHAINS } from './utils/gmp.js';
|
|
50
|
+
//# sourceMappingURL=axelar-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axelar-types.d.ts","sourceRoot":"","sources":["axelar-types.js"],"names":[],"mappings":";;;;;6BAuBa,CAAC,OAAO,oBAAoB,EAAE,MAAM,OAAO,oBAAoB,CAAC;;kBAK/D,MAAM;oBACN,MAAM;aACN,MAAM;UACN,cAAc;;;YAKd,MAAM;eACN,aAAa;;;uBAKb,MAAM;yBACN,MAAM;aACN,MAAM,EAAE,GAAG,IAAI;UACf,cAAc;;;;kBAMd,qBAAqB;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE,CAAC;uBAC3C,kBAAkB;mBAClB,YAAY;gBACZ,KAAK;YACL,GAAG;qBACH,GAAG;;;YAKH,KAAK,MAAM,EAAE;uBACb,MAAM;UACN,OAAO,EAAE;;;YAKT,KAAK,MAAM,EAAE;UACb,KAAK,MAAM,EAAE;;yCAId,MAAa,iBAAU;mCArEV,uBAAuB;0CAAvB,uBAAuB;wCAAvB,uBAAuB;kCAClB,cAAc;2BADnB,uBAAuB;gCAEpB,gBAAgB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {OrchestrationAccount,
|
|
3
|
+
* CosmosChainAddress,
|
|
4
|
+
* Denom,
|
|
5
|
+
* Bech32Address,} from '@agoric/orchestration';
|
|
6
|
+
* @import {IBCChannelID} from '@agoric/vats';
|
|
7
|
+
* @import {EVM_CHAINS} from './utils/gmp.js';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// NOTE: The following 3 types are also documented in README.md located at:
|
|
11
|
+
// @agoric/orchestration/docs/axelar-gmp/README.md
|
|
12
|
+
// - GMPMessageType
|
|
13
|
+
// - AxelarFeeObject
|
|
14
|
+
// - AxelarGmpOutgoingMemo
|
|
15
|
+
// If you change any of these, you must also update the README to keep it in sync.
|
|
16
|
+
|
|
17
|
+
export const AxelarGMPMessageType = {
|
|
18
|
+
ContractCall: 1,
|
|
19
|
+
ContractCallWithToken: 2,
|
|
20
|
+
TokenTransfer: 3,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {(typeof AxelarGMPMessageType)[keyof typeof AxelarGMPMessageType]} GMPMessageType
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {object} AxelarGmpIncomingMemo
|
|
29
|
+
* @property {string} source_chain
|
|
30
|
+
* @property {string} source_address
|
|
31
|
+
* @property {string} payload
|
|
32
|
+
* @property {GMPMessageType} type
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {object} AxelarFeeObject
|
|
37
|
+
* @property {string} amount
|
|
38
|
+
* @property {Bech32Address} recipient
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {object} AxelarGmpOutgoingMemo
|
|
43
|
+
* @property {string} destination_chain
|
|
44
|
+
* @property {string} destination_address
|
|
45
|
+
* @property {number[] | null} payload
|
|
46
|
+
* @property {GMPMessageType} type
|
|
47
|
+
* @property {AxelarFeeObject} [fee]
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @typedef {object} EvmTapState
|
|
52
|
+
* @property {OrchestrationAccount<{ chainId: 'agoric' }>} localAccount
|
|
53
|
+
* @property {CosmosChainAddress} localChainAddress
|
|
54
|
+
* @property {IBCChannelID} sourceChannel
|
|
55
|
+
* @property {Denom} localDenom
|
|
56
|
+
* @property {any} assets
|
|
57
|
+
* @property {any} remoteChainInfo
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {object} ContractCall
|
|
62
|
+
* @property {`0x${string}`} target
|
|
63
|
+
* @property {string} functionSignature
|
|
64
|
+
* @property {unknown[]} args
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @typedef {object} AbiEncodedContractCall
|
|
69
|
+
* @property {`0x${string}`} target
|
|
70
|
+
* @property {`0x${string}`} data
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @typedef {keyof typeof EVM_CHAINS} SupportedDestinationChains
|
|
75
|
+
*/
|