@agoric/orchestration 0.2.0-upgrade-20-dev-ef71cfd.0 → 0.2.0-upgrade-21-dev-16519b2.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 +32 -28
- 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 +1001 -84
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +1 -1
- package/src/cosmos-api.d.ts +20 -5
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +20 -5
- package/src/ethereum-api.d.ts.map +1 -1
- package/src/ethereum-api.ts +1 -0
- package/src/examples/auto-stake-it.contract.d.ts +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/examples/basic-flows.contract.d.ts +1 -1
- package/src/examples/send-anywhere.contract.d.ts +1 -1
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +9 -7
- package/src/examples/stake-bld.contract.d.ts +6 -0
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.d.ts +33 -24
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +1 -1
- package/src/examples/staking-combinations.contract.d.ts +1 -1
- package/src/examples/swap-anything.contract.d.ts +48 -0
- package/src/examples/swap-anything.contract.d.ts.map +1 -0
- package/src/examples/swap-anything.contract.js +187 -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-anything.flows.js +222 -0
- package/src/examples/swap.contract.d.ts +1 -1
- package/src/examples/unbond.contract.d.ts +1 -1
- package/src/exos/combine-invitation-makers.d.ts.map +1 -1
- package/src/exos/combine-invitation-makers.js +4 -2
- package/src/exos/cosmos-orchestration-account.d.ts +9 -1
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +62 -55
- package/src/exos/ibc-packet.d.ts +35 -8
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ibc-packet.js +59 -11
- package/src/exos/ica-account-kit.d.ts +12 -2
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +15 -7
- package/src/exos/local-orchestration-account.d.ts +44 -8
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +131 -13
- package/src/exos/orchestrator.d.ts +2 -2
- package/src/exos/packet-tools.d.ts +2 -1
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +14 -1
- package/src/fetched-chain-info.d.ts +1497 -578
- package/src/fetched-chain-info.js +996 -82
- package/src/fixtures/query-flows.contract.d.ts +10 -3
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +18 -2
- package/src/orchestration-api.d.ts +10 -2
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +11 -2
- package/src/proposals/start-axelar-gmp.js +153 -0
- package/src/proposals/start-stakeAtom.js +29 -16
- package/src/proposals/start-stakeOsmo.js +29 -16
- package/src/proposals/start-swap-anything.js +133 -0
- package/src/typeGuards.d.ts +1 -1
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +4 -1
- package/src/utils/address.d.ts +4 -1
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +58 -1
- 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/chain-hub-helper.d.ts +6 -1
- package/src/utils/chain-hub-helper.d.ts.map +1 -1
- package/src/utils/chain-hub-helper.js +7 -4
- 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/src/utils/start-helper.d.ts +2 -2
- package/src/utils/time.d.ts +11 -7
- package/src/utils/time.d.ts.map +1 -1
- package/src/utils/time.js +24 -13
- package/src/vat-orchestration.d.ts +1 -1
- package/tools/contract-tests.d.ts +1790 -0
- package/tools/contract-tests.d.ts.map +1 -0
- package/tools/contract-tests.ts +295 -0
- package/tools/ibc-mocks.d.ts +49 -10
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +126 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.2.0-upgrade-
|
|
3
|
+
"version": "0.2.0-upgrade-21-dev-16519b2.0+16519b2",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -9,17 +9,18 @@
|
|
|
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
|
-
"prepack": "tsc --build tsconfig.build.json",
|
|
15
|
+
"prepack": "yarn run -T tsc --build tsconfig.build.json",
|
|
15
16
|
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
|
|
16
17
|
"test": "ava",
|
|
17
18
|
"test:c8": "c8 --all $C8_OPTIONS ava",
|
|
18
19
|
"test:xs": "exit 0",
|
|
19
|
-
"lint": "
|
|
20
|
-
"lint
|
|
21
|
-
"lint:eslint": "eslint .",
|
|
22
|
-
"lint
|
|
20
|
+
"lint-fix": "yarn lint:eslint --fix",
|
|
21
|
+
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
22
|
+
"lint:eslint": "yarn run -T eslint .",
|
|
23
|
+
"lint:types": "yarn run -T tsc"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -33,41 +34,44 @@
|
|
|
33
34
|
},
|
|
34
35
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "
|
|
37
|
-
"@agoric/cosmic-proto": "
|
|
38
|
-
"@agoric/ertp": "
|
|
39
|
-
"@agoric/internal": "
|
|
40
|
-
"@agoric/network": "
|
|
41
|
-
"@agoric/notifier": "
|
|
42
|
-
"@agoric/store": "
|
|
43
|
-
"@agoric/time": "
|
|
44
|
-
"@agoric/vat-data": "
|
|
45
|
-
"@agoric/vats": "
|
|
46
|
-
"@agoric/vow": "
|
|
47
|
-
"@agoric/zoe": "
|
|
48
|
-
"@agoric/zone": "
|
|
37
|
+
"@agoric/async-flow": "workspace:*",
|
|
38
|
+
"@agoric/cosmic-proto": "workspace:*",
|
|
39
|
+
"@agoric/ertp": "workspace:*",
|
|
40
|
+
"@agoric/internal": "workspace:*",
|
|
41
|
+
"@agoric/network": "workspace:*",
|
|
42
|
+
"@agoric/notifier": "workspace:*",
|
|
43
|
+
"@agoric/store": "workspace:*",
|
|
44
|
+
"@agoric/time": "workspace:*",
|
|
45
|
+
"@agoric/vat-data": "workspace:*",
|
|
46
|
+
"@agoric/vats": "workspace:*",
|
|
47
|
+
"@agoric/vow": "workspace:*",
|
|
48
|
+
"@agoric/zoe": "workspace:*",
|
|
49
|
+
"@agoric/zone": "workspace:*",
|
|
49
50
|
"@cosmjs/encoding": "^0.32.4",
|
|
50
51
|
"@endo/base64": "^1.0.9",
|
|
51
52
|
"@endo/errors": "^1.2.10",
|
|
53
|
+
"@endo/eventual-send": "^1.3.1",
|
|
52
54
|
"@endo/far": "^1.1.11",
|
|
53
55
|
"@endo/marshal": "^1.6.4",
|
|
54
56
|
"@endo/patterns": "^1.5.0",
|
|
55
57
|
"@noble/hashes": "^1.5.0",
|
|
56
|
-
"bs58": "^6.0.0"
|
|
58
|
+
"bs58": "^6.0.0",
|
|
59
|
+
"esbuild": "^0.25.2",
|
|
60
|
+
"viem": "^2.31.0"
|
|
57
61
|
},
|
|
58
62
|
"devDependencies": {
|
|
59
|
-
"@agoric/swingset-liveslots": "
|
|
63
|
+
"@agoric/swingset-liveslots": "workspace:*",
|
|
60
64
|
"@chain-registry/client": "^1.47.4",
|
|
61
65
|
"@cosmjs/amino": "^0.33.0",
|
|
62
66
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
63
67
|
"@endo/bundle-source": "^4.0.0",
|
|
64
68
|
"@endo/import-bundle": "^1.4.0",
|
|
65
69
|
"@endo/ses-ava": "^1.2.10",
|
|
66
|
-
"ava": "^5.3.
|
|
70
|
+
"ava": "^5.3.0",
|
|
67
71
|
"bech32": "^2.0.0",
|
|
68
|
-
"c8": "^10.1.
|
|
69
|
-
"prettier": "^3.
|
|
70
|
-
"ts-blank-space": "^0.
|
|
72
|
+
"c8": "^10.1.3",
|
|
73
|
+
"prettier": "^3.5.3",
|
|
74
|
+
"ts-blank-space": "^0.6.1"
|
|
71
75
|
},
|
|
72
76
|
"ava": {
|
|
73
77
|
"extensions": {
|
|
@@ -97,7 +101,7 @@
|
|
|
97
101
|
"access": "public"
|
|
98
102
|
},
|
|
99
103
|
"typeCoverage": {
|
|
100
|
-
"atLeast": 97.
|
|
104
|
+
"atLeast": 97.7
|
|
101
105
|
},
|
|
102
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "16519b2de1eb2afda2b4ec866f55eadd4bb18223"
|
|
103
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 SupportedEVMChains = 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;;iCAId,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} SupportedEVMChains
|
|
75
|
+
*/
|