@wormhole-foundation/sdk-cosmwasm 0.5.0-alpha.3 → 0.5.0-alpha.4
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/dist/cjs/address.d.ts +30 -0
- package/dist/cjs/address.d.ts.map +1 -0
- package/dist/cjs/address.js +217 -0
- package/dist/cjs/address.js.map +1 -0
- package/dist/cjs/chain.d.ts +6 -0
- package/dist/cjs/chain.d.ts.map +1 -0
- package/dist/cjs/chain.js +8 -0
- package/dist/cjs/chain.js.map +1 -0
- package/dist/cjs/constants.d.ts +771 -0
- package/dist/cjs/constants.d.ts.map +1 -0
- package/dist/cjs/constants.js +180 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/gateway.d.ts +17 -0
- package/dist/cjs/gateway.d.ts.map +1 -0
- package/dist/cjs/gateway.js +75 -0
- package/dist/cjs/gateway.js.map +1 -0
- package/dist/cjs/index.d.ts +12 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/platform.d.ts +35 -0
- package/dist/cjs/platform.d.ts.map +1 -0
- package/dist/cjs/platform.js +131 -0
- package/dist/cjs/platform.js.map +1 -0
- package/dist/cjs/signer.d.ts +32 -0
- package/dist/cjs/signer.d.ts.map +1 -0
- package/dist/cjs/signer.js +114 -0
- package/dist/cjs/signer.js.map +1 -0
- package/dist/cjs/types.d.ts +18 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +20 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/unsignedTransaction.d.ts +20 -0
- package/dist/cjs/unsignedTransaction.d.ts.map +1 -0
- package/dist/cjs/unsignedTransaction.js +43 -0
- package/dist/cjs/unsignedTransaction.js.map +1 -0
- package/dist/esm/index.d.ts +11 -11
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.js.map +1 -1
- package/package.json +14 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Address } from "@wormhole-foundation/sdk-connect";
|
|
2
|
+
import { UniversalAddress } from "@wormhole-foundation/sdk-connect";
|
|
3
|
+
import type { AnyCosmwasmAddress } from "./types.js";
|
|
4
|
+
export declare class CosmwasmAddress implements Address {
|
|
5
|
+
static readonly contractAddressByteSize = 32;
|
|
6
|
+
static readonly accountAddressByteSize = 20;
|
|
7
|
+
readonly platform: "Cosmwasm";
|
|
8
|
+
readonly address: Uint8Array;
|
|
9
|
+
readonly domain?: string;
|
|
10
|
+
readonly denom?: string;
|
|
11
|
+
readonly denomType?: string;
|
|
12
|
+
constructor(address: AnyCosmwasmAddress);
|
|
13
|
+
unwrap(): string;
|
|
14
|
+
toString(): string;
|
|
15
|
+
toNative(): this;
|
|
16
|
+
toUint8Array(): Uint8Array;
|
|
17
|
+
toUniversalAddress(): UniversalAddress;
|
|
18
|
+
static isValidAddress(address: string): boolean;
|
|
19
|
+
private static validAddressLength;
|
|
20
|
+
static instanceof(address: any): address is CosmwasmAddress;
|
|
21
|
+
equals(other: CosmwasmAddress | UniversalAddress): boolean;
|
|
22
|
+
}
|
|
23
|
+
declare module "@wormhole-foundation/sdk-connect" {
|
|
24
|
+
namespace WormholeRegistry {
|
|
25
|
+
interface PlatformToNativeAddressMapping {
|
|
26
|
+
Cosmwasm: CosmwasmAddress;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/address.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAA4B,MAAM,kCAAkC,CAAC;AAE9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAsFrD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,MAAM,CAAC,QAAQ,CAAC,uBAAuB,MAAM;IAC7C,MAAM,CAAC,QAAQ,CAAC,sBAAsB,MAAM;IAC5C,SAAgB,QAAQ,aAA8B;IAGtD,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAG7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEhB,OAAO,EAAE,kBAAkB;IAwDvC,MAAM,IAAI,MAAM;IAIhB,QAAQ,IAAI,MAAM;IAoBlB,QAAQ;IAIR,YAAY;IAIZ,kBAAkB;IAMlB,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAQ/C,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAajC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,eAAe;IAI3D,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,GAAG,OAAO;CAO3D;AAED,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAiB,gBAAgB,CAAC;QAChC,UAAU,8BAA8B;YACtC,QAAQ,EAAE,eAAe,CAAC;SAC3B;KACF;CACF"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CosmwasmAddress = void 0;
|
|
4
|
+
const encoding_1 = require("@cosmjs/encoding");
|
|
5
|
+
const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
|
|
6
|
+
const platform_js_1 = require("./platform.js");
|
|
7
|
+
const types_js_1 = require("./types.js");
|
|
8
|
+
/*
|
|
9
|
+
Categories:
|
|
10
|
+
|
|
11
|
+
Bank Tokens
|
|
12
|
+
|
|
13
|
+
uatom,ibc/...,factory/...
|
|
14
|
+
|
|
15
|
+
Contract Tokens
|
|
16
|
+
|
|
17
|
+
*/
|
|
18
|
+
/*
|
|
19
|
+
Cosmos Addresses
|
|
20
|
+
-----
|
|
21
|
+
|
|
22
|
+
There are at least 5 types of addresses in Cosmos:
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Native Denom
|
|
26
|
+
ex: "uatom"
|
|
27
|
+
|
|
28
|
+
address = [] // 0 bytes
|
|
29
|
+
domain = undefined
|
|
30
|
+
denom = "uatom"
|
|
31
|
+
denomType = "native"
|
|
32
|
+
|
|
33
|
+
Contract Address
|
|
34
|
+
ex: "wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"
|
|
35
|
+
|
|
36
|
+
address = [0x...] // 32 bytes
|
|
37
|
+
domain = "wormhole"
|
|
38
|
+
denom = undefined
|
|
39
|
+
denomType = undefined
|
|
40
|
+
|
|
41
|
+
Account Address
|
|
42
|
+
ex: "cosmos1hsk6jryyqjfhp5dhc55tc9jtckygx0eph6dd02"
|
|
43
|
+
|
|
44
|
+
address = [0x...] // 20 bytes
|
|
45
|
+
domain = "cosmos"
|
|
46
|
+
denom = undefined
|
|
47
|
+
denomType = undefined
|
|
48
|
+
|
|
49
|
+
IBC Denom
|
|
50
|
+
ex: IBC/BAEAC83736444C09656FBE666FB625974FCCDEE566EB700EBFD2642C5F6CF13A
|
|
51
|
+
|
|
52
|
+
address = [0x...] // 32 bytes
|
|
53
|
+
domain = undefined
|
|
54
|
+
denom = undefined
|
|
55
|
+
denomType = "IBC"
|
|
56
|
+
|
|
57
|
+
Factory Address
|
|
58
|
+
ex: "factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/avax"
|
|
59
|
+
|
|
60
|
+
address = [0x...] 20 bytes
|
|
61
|
+
domain = "inj"
|
|
62
|
+
denom = "avax"
|
|
63
|
+
denomType = "factory"
|
|
64
|
+
|
|
65
|
+
Transfer Denom
|
|
66
|
+
ex: transfer/channel-486/factory/wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk/6vxRV62YN1CTZeQM5ZfvCZDCVA4nLhtZcLxziYa7xYqb
|
|
67
|
+
|
|
68
|
+
address = [0x...] 32 bytes
|
|
69
|
+
domain = "wormhole"
|
|
70
|
+
denom = "6vxRV62YN1CTZeQM5ZfvCZDCVA4nLhtZcLxziYa7xYqb"
|
|
71
|
+
denomType = "transfer/channel-486/factory"
|
|
72
|
+
*/
|
|
73
|
+
// Factory type addresses may have hex or b64 or bech32 encoded addresses
|
|
74
|
+
function tryDecode(data) {
|
|
75
|
+
try {
|
|
76
|
+
return { ...(0, encoding_1.fromBech32)(data) };
|
|
77
|
+
}
|
|
78
|
+
catch { }
|
|
79
|
+
try {
|
|
80
|
+
return { data: (0, encoding_1.fromHex)(data) };
|
|
81
|
+
}
|
|
82
|
+
catch { }
|
|
83
|
+
try {
|
|
84
|
+
return { data: (0, encoding_1.fromBase64)(data) };
|
|
85
|
+
}
|
|
86
|
+
catch { }
|
|
87
|
+
throw new Error(`Cannot decode: ${data}`);
|
|
88
|
+
}
|
|
89
|
+
class CosmwasmAddress {
|
|
90
|
+
static contractAddressByteSize = 32;
|
|
91
|
+
static accountAddressByteSize = 20;
|
|
92
|
+
platform = platform_js_1.CosmwasmPlatform._platform;
|
|
93
|
+
// the actual bytes of the address
|
|
94
|
+
address;
|
|
95
|
+
// The domain is the prefix for the address, like "cosmos" or "ibc"
|
|
96
|
+
domain;
|
|
97
|
+
// The denom is the token name, like "uatom" or "usdc"
|
|
98
|
+
denom;
|
|
99
|
+
// The denomType is "native", "ibc", or "factory"
|
|
100
|
+
denomType;
|
|
101
|
+
constructor(address) {
|
|
102
|
+
if (CosmwasmAddress.instanceof(address)) {
|
|
103
|
+
const a = address;
|
|
104
|
+
this.address = a.address;
|
|
105
|
+
this.domain = a.domain;
|
|
106
|
+
this.denom = a.denom;
|
|
107
|
+
this.denomType = a.denomType;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (typeof address === "string") {
|
|
111
|
+
// A native denom like "uatom"
|
|
112
|
+
if (address.length <= 8) {
|
|
113
|
+
this.address = new Uint8Array(0);
|
|
114
|
+
this.denom = address;
|
|
115
|
+
this.denomType = "native";
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (address.indexOf("/") !== -1) {
|
|
119
|
+
// A denom address like "ibc/..." or "factory/..." or "transfer/channel-${id}/factory/..."
|
|
120
|
+
const chunks = address.split("/");
|
|
121
|
+
// It's a `transfer/...` denom
|
|
122
|
+
if (chunks.length >= 3) {
|
|
123
|
+
// Address will be second from the last
|
|
124
|
+
const { data, prefix } = tryDecode(chunks[chunks.length - 2]);
|
|
125
|
+
this.address = data;
|
|
126
|
+
this.domain = prefix;
|
|
127
|
+
this.denom = chunks[chunks.length - 1];
|
|
128
|
+
this.denomType = chunks.slice(0, chunks.length - 2).join("/");
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const { data } = tryDecode(chunks[1]);
|
|
132
|
+
this.address = data;
|
|
133
|
+
this.denomType = chunks[0];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// should be a contract or account address by now
|
|
138
|
+
if (!CosmwasmAddress.isValidAddress(address))
|
|
139
|
+
throw new Error(`Invalid Cosmwasm address: ${address}`);
|
|
140
|
+
const { data, prefix } = (0, encoding_1.fromBech32)(address);
|
|
141
|
+
this.address = data;
|
|
142
|
+
this.domain = prefix;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else if (address instanceof Uint8Array) {
|
|
146
|
+
this.address = address;
|
|
147
|
+
}
|
|
148
|
+
else if (sdk_connect_1.UniversalAddress.instanceof(address)) {
|
|
149
|
+
this.address = address.toUint8Array();
|
|
150
|
+
}
|
|
151
|
+
else
|
|
152
|
+
throw new Error(`Invalid Cosmwasm address ${address}`);
|
|
153
|
+
if (!CosmwasmAddress.validAddressLength(this.address)) {
|
|
154
|
+
throw new Error("Expected 20 or 32 bytes address");
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
unwrap() {
|
|
158
|
+
return this.toString();
|
|
159
|
+
}
|
|
160
|
+
toString() {
|
|
161
|
+
// Coin address
|
|
162
|
+
if (this.denomType !== undefined) {
|
|
163
|
+
// native asset denom
|
|
164
|
+
if (this.denomType === "native")
|
|
165
|
+
return this.denom;
|
|
166
|
+
// ibc/hex
|
|
167
|
+
if (this.denomType === "ibc") {
|
|
168
|
+
// NOTE: this is case sensitive, should be `ibc` not `IBC`
|
|
169
|
+
return `${this.denomType.toLowerCase()}/${sdk_connect_1.encoding.hex.encode(this.address).toUpperCase()}`;
|
|
170
|
+
}
|
|
171
|
+
// ?/factory/address/denom
|
|
172
|
+
return `${this.denomType}/${(0, encoding_1.toBech32)(this.domain, this.address)}/${this.denom}`;
|
|
173
|
+
}
|
|
174
|
+
// contract or account address
|
|
175
|
+
return (0, encoding_1.toBech32)(this.domain, this.address);
|
|
176
|
+
}
|
|
177
|
+
toNative() {
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
toUint8Array() {
|
|
181
|
+
return this.address;
|
|
182
|
+
}
|
|
183
|
+
toUniversalAddress() {
|
|
184
|
+
const buff = new Uint8Array(sdk_connect_1.UniversalAddress.byteSize);
|
|
185
|
+
buff.set(this.address, sdk_connect_1.UniversalAddress.byteSize - this.address.length);
|
|
186
|
+
return new sdk_connect_1.UniversalAddress(buff);
|
|
187
|
+
}
|
|
188
|
+
static isValidAddress(address) {
|
|
189
|
+
try {
|
|
190
|
+
const maybe = (0, encoding_1.fromBech32)(address);
|
|
191
|
+
return CosmwasmAddress.validAddressLength(maybe.data);
|
|
192
|
+
}
|
|
193
|
+
catch { }
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
static validAddressLength(address) {
|
|
197
|
+
if (address.length !== CosmwasmAddress.contractAddressByteSize &&
|
|
198
|
+
address.length !== CosmwasmAddress.accountAddressByteSize)
|
|
199
|
+
throw new Error(`Invalid Cosmwasm address, expected ${CosmwasmAddress.contractAddressByteSize} ` +
|
|
200
|
+
`or ${CosmwasmAddress.accountAddressByteSize} bytes but got ${address.length}`);
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
static instanceof(address) {
|
|
204
|
+
return address.platform === platform_js_1.CosmwasmPlatform._platform;
|
|
205
|
+
}
|
|
206
|
+
equals(other) {
|
|
207
|
+
if (CosmwasmAddress.instanceof(other)) {
|
|
208
|
+
return this.toString() === other.toString();
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
return other.equals(this.toUniversalAddress());
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
exports.CosmwasmAddress = CosmwasmAddress;
|
|
216
|
+
(0, sdk_connect_1.registerNative)(types_js_1._platform, CosmwasmAddress);
|
|
217
|
+
//# sourceMappingURL=address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src/address.ts"],"names":[],"mappings":";;;AAAA,+CAA6E;AAE7E,kEAA8F;AAC9F,+CAAiD;AAEjD,yCAAuC;AAEvC;;;;;;;;;EASE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDE;AAEF,yEAAyE;AACzE,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI;QACF,OAAO,EAAE,GAAG,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;KAChC;IAAC,MAAM,GAAE;IAEV,IAAI;QACF,OAAO,EAAE,IAAI,EAAE,IAAA,kBAAO,EAAC,IAAI,CAAC,EAAE,CAAC;KAChC;IAAC,MAAM,GAAE;IAEV,IAAI;QACF,OAAO,EAAE,IAAI,EAAE,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;KACnC;IAAC,MAAM,GAAE;IAEV,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,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CAAC;IAED,MAAM,CAAC,cAAc,CAAC,OAAe;QACnC,IAAI;YACF,MAAM,KAAK,GAAG,IAAA,qBAAU,EAAC,OAAO,CAAC,CAAC;YAClC,OAAO,eAAe,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACvD;QAAC,MAAM,GAAE;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,kBAAkB,CAAC,OAAmB;QACnD,IACE,OAAO,CAAC,MAAM,KAAK,eAAe,CAAC,uBAAuB;YAC1D,OAAO,CAAC,MAAM,KAAK,eAAe,CAAC,sBAAsB;YAEzD,MAAM,IAAI,KAAK,CACb,sCAAsC,eAAe,CAAC,uBAAuB,GAAG;gBAC9E,MAAM,eAAe,CAAC,sBAAsB,kBAAkB,OAAO,CAAC,MAAM,EAAE,CACjF,CAAC;QAEJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAY;QAC5B,OAAO,OAAO,CAAC,QAAQ,KAAK,8BAAgB,CAAC,SAAS,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,KAAyC;QAC9C,IAAI,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YACrC,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;SAC7C;aAAM;YACL,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;SAChD;IACH,CAAC;;AA5IH,0CA6IC;AAUD,IAAA,4BAAc,EAAC,oBAAS,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Chain, Network } from "@wormhole-foundation/sdk-connect";
|
|
2
|
+
import { ChainContext } from "@wormhole-foundation/sdk-connect";
|
|
3
|
+
import type { CosmwasmChains } from "./types.js";
|
|
4
|
+
export declare class CosmwasmChain<N extends Network = Network, C extends Chain = CosmwasmChains> extends ChainContext<N, C> {
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,aAAa,CACxB,CAAC,SAAS,OAAO,GAAG,OAAO,EAC3B,CAAC,SAAS,KAAK,GAAG,cAAc,CAChC,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CosmwasmChain = void 0;
|
|
4
|
+
const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
|
|
5
|
+
class CosmwasmChain extends sdk_connect_1.ChainContext {
|
|
6
|
+
}
|
|
7
|
+
exports.CosmwasmChain = CosmwasmChain;
|
|
8
|
+
//# sourceMappingURL=chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":";;;AACA,kEAAgE;AAGhE,MAAa,aAGX,SAAQ,0BAAkB;CAAG;AAH/B,sCAG+B"}
|