@swapkit/toolboxes 4.0.0-beta.67 → 4.0.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/dist/src/cosmos/index.cjs +2 -2
- package/dist/src/cosmos/index.cjs.map +8 -8
- package/dist/src/cosmos/index.js +2 -2
- package/dist/src/cosmos/index.js.map +8 -8
- package/dist/src/evm/index.cjs +2 -2
- package/dist/src/evm/index.cjs.map +13 -13
- package/dist/src/evm/index.js +2 -2
- package/dist/src/evm/index.js.map +13 -13
- package/dist/src/index.cjs +3 -3
- package/dist/src/index.cjs.map +46 -45
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +46 -45
- package/dist/src/near/index.cjs +2 -2
- package/dist/src/near/index.cjs.map +8 -8
- package/dist/src/near/index.js +2 -2
- package/dist/src/near/index.js.map +8 -8
- package/dist/src/radix/index.cjs +2 -2
- package/dist/src/radix/index.cjs.map +3 -3
- package/dist/src/radix/index.js +2 -2
- package/dist/src/radix/index.js.map +3 -3
- package/dist/src/ripple/index.cjs +2 -2
- package/dist/src/ripple/index.cjs.map +3 -3
- package/dist/src/ripple/index.js +2 -2
- package/dist/src/ripple/index.js.map +3 -3
- package/dist/src/solana/index.cjs +2 -2
- package/dist/src/solana/index.cjs.map +4 -4
- package/dist/src/solana/index.js +2 -2
- package/dist/src/solana/index.js.map +4 -4
- package/dist/src/substrate/index.cjs +2 -2
- package/dist/src/substrate/index.cjs.map +5 -5
- package/dist/src/substrate/index.js +2 -2
- package/dist/src/substrate/index.js.map +5 -5
- package/dist/src/tron/index.cjs +2 -2
- package/dist/src/tron/index.cjs.map +5 -5
- package/dist/src/tron/index.js +2 -2
- package/dist/src/tron/index.js.map +5 -5
- package/dist/src/utxo/index.cjs +3 -3
- package/dist/src/utxo/index.cjs.map +14 -13
- package/dist/src/utxo/index.js +3 -3
- package/dist/src/utxo/index.js.map +14 -13
- package/dist/types/cosmos/thorchainUtils/addressFormat.d.ts.map +1 -1
- package/dist/types/cosmos/thorchainUtils/messages.d.ts +58 -58
- package/dist/types/cosmos/thorchainUtils/messages.d.ts.map +1 -1
- package/dist/types/cosmos/thorchainUtils/registry.d.ts.map +1 -1
- package/dist/types/cosmos/thorchainUtils/types/client-types.d.ts +2 -5
- package/dist/types/cosmos/thorchainUtils/types/client-types.d.ts.map +1 -1
- package/dist/types/cosmos/toolbox/cosmos.d.ts +19 -41
- package/dist/types/cosmos/toolbox/cosmos.d.ts.map +1 -1
- package/dist/types/cosmos/toolbox/thorchain.d.ts +45 -46
- package/dist/types/cosmos/toolbox/thorchain.d.ts.map +1 -1
- package/dist/types/cosmos/types.d.ts +5 -1
- package/dist/types/cosmos/types.d.ts.map +1 -1
- package/dist/types/cosmos/util.d.ts +12 -13
- package/dist/types/cosmos/util.d.ts.map +1 -1
- package/dist/types/evm/api.d.ts.map +1 -1
- package/dist/types/evm/contracts/op/gasOracle.d.ts.map +1 -1
- package/dist/types/evm/helpers.d.ts +1 -15
- package/dist/types/evm/helpers.d.ts.map +1 -1
- package/dist/types/evm/index.d.ts +1 -1
- package/dist/types/evm/index.d.ts.map +1 -1
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts +14 -14
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts.map +1 -1
- package/dist/types/evm/toolbox/evm.d.ts +108 -108
- package/dist/types/evm/toolbox/evm.d.ts.map +1 -1
- package/dist/types/evm/toolbox/index.d.ts +97 -29
- package/dist/types/evm/toolbox/index.d.ts.map +1 -1
- package/dist/types/evm/toolbox/op.d.ts +36 -24
- package/dist/types/evm/toolbox/op.d.ts.map +1 -1
- package/dist/types/evm/types.d.ts +1 -1
- package/dist/types/evm/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/near/helpers/core.d.ts +1 -1
- package/dist/types/near/helpers/core.d.ts.map +1 -1
- package/dist/types/near/helpers/gasEstimation.d.ts +5 -5
- package/dist/types/near/helpers/gasEstimation.d.ts.map +1 -1
- package/dist/types/near/helpers/nep141.d.ts.map +1 -1
- package/dist/types/near/index.d.ts +4 -4
- package/dist/types/near/index.d.ts.map +1 -1
- package/dist/types/near/toolbox.d.ts.map +1 -1
- package/dist/types/near/types/contract.d.ts.map +1 -1
- package/dist/types/near/types/nep141.d.ts.map +1 -1
- package/dist/types/near/types/toolbox.d.ts.map +1 -1
- package/dist/types/near/types.d.ts +2 -2
- package/dist/types/near/types.d.ts.map +1 -1
- package/dist/types/radix/index.d.ts +2 -2
- package/dist/types/radix/index.d.ts.map +1 -1
- package/dist/types/ripple/index.d.ts +14 -11
- package/dist/types/ripple/index.d.ts.map +1 -1
- package/dist/types/solana/index.d.ts.map +1 -1
- package/dist/types/solana/toolbox.d.ts +10 -10
- package/dist/types/solana/toolbox.d.ts.map +1 -1
- package/dist/types/substrate/balance.d.ts.map +1 -1
- package/dist/types/substrate/substrate.d.ts +45 -45
- package/dist/types/substrate/substrate.d.ts.map +1 -1
- package/dist/types/substrate/types.d.ts +12 -12
- package/dist/types/substrate/types.d.ts.map +1 -1
- package/dist/types/tron/helpers/trongrid.d.ts.map +1 -1
- package/dist/types/tron/index.d.ts +2 -2
- package/dist/types/tron/index.d.ts.map +1 -1
- package/dist/types/tron/toolbox.d.ts +1 -1
- package/dist/types/tron/toolbox.d.ts.map +1 -1
- package/dist/types/tron/types.d.ts.map +1 -1
- package/dist/types/utxo/helpers/api.d.ts +15 -15
- package/dist/types/utxo/helpers/api.d.ts.map +1 -1
- package/dist/types/utxo/helpers/bchaddrjs.d.ts.map +1 -1
- package/dist/types/utxo/helpers/coinselect.d.ts +4 -4
- package/dist/types/utxo/helpers/coinselect.d.ts.map +1 -1
- package/dist/types/utxo/helpers/txSize.d.ts.map +1 -1
- package/dist/types/utxo/index.d.ts +1 -1
- package/dist/types/utxo/index.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts +26 -38
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/index.d.ts +3 -3
- package/dist/types/utxo/toolbox/index.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/utxo.d.ts +27 -38
- package/dist/types/utxo/toolbox/utxo.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/validators.d.ts +4 -0
- package/dist/types/utxo/toolbox/validators.d.ts.map +1 -0
- package/dist/types/utxo/toolbox/zcash.d.ts +26 -37
- package/dist/types/utxo/toolbox/zcash.d.ts.map +1 -1
- package/dist/types/utxo/types.d.ts.map +1 -1
- package/package.json +15 -22
|
@@ -13,12 +13,12 @@ export declare const transferMsgAmino: ({ sender, recipient, assetValue, }: {
|
|
|
13
13
|
}) => {
|
|
14
14
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
15
15
|
value: {
|
|
16
|
-
from_address: string;
|
|
17
|
-
to_address: string | undefined;
|
|
18
16
|
amount: {
|
|
19
17
|
amount: string;
|
|
20
18
|
denom: string;
|
|
21
19
|
}[];
|
|
20
|
+
from_address: string;
|
|
21
|
+
to_address: string | undefined;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export declare const depositMsgAmino: ({ sender, assetValue, memo, }: {
|
|
@@ -32,8 +32,8 @@ export declare const depositMsgAmino: ({ sender, assetValue, memo, }: {
|
|
|
32
32
|
amount: string;
|
|
33
33
|
asset: string;
|
|
34
34
|
}[];
|
|
35
|
-
signer: string;
|
|
36
35
|
memo: string;
|
|
36
|
+
signer: string;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
export declare const buildAminoMsg: ({ sender, recipient, assetValue, memo, }: {
|
|
@@ -42,54 +42,61 @@ export declare const buildAminoMsg: ({ sender, recipient, assetValue, memo, }: {
|
|
|
42
42
|
assetValue: AssetValue;
|
|
43
43
|
memo?: string;
|
|
44
44
|
}) => {
|
|
45
|
-
type: "thorchain/
|
|
45
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
46
46
|
value: {
|
|
47
|
-
|
|
48
|
-
to_address: string | undefined;
|
|
49
|
-
amount: {
|
|
47
|
+
coins: {
|
|
50
48
|
amount: string;
|
|
51
|
-
|
|
49
|
+
asset: string;
|
|
52
50
|
}[];
|
|
51
|
+
memo: string;
|
|
52
|
+
signer: string;
|
|
53
53
|
};
|
|
54
54
|
} | {
|
|
55
|
-
type: "thorchain/
|
|
55
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
56
56
|
value: {
|
|
57
|
-
|
|
57
|
+
amount: {
|
|
58
58
|
amount: string;
|
|
59
|
-
|
|
59
|
+
denom: string;
|
|
60
60
|
}[];
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
from_address: string;
|
|
62
|
+
to_address: string | undefined;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
export declare const convertToSignable: (msg: MsgSend | MsgDeposit, chain: Chain.THORChain | Chain.Maya) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
66
66
|
export declare function getCreateTransaction(rpcUrl: string): (params: ThorchainCreateTransactionParams) => Promise<{
|
|
67
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
68
67
|
accountNumber: number;
|
|
69
|
-
|
|
68
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
69
|
+
fee: {
|
|
70
|
+
amount: {
|
|
71
|
+
amount: string;
|
|
72
|
+
denom: string;
|
|
73
|
+
}[];
|
|
74
|
+
gas: string;
|
|
75
|
+
};
|
|
76
|
+
memo: string;
|
|
70
77
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
71
78
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
72
79
|
value: {
|
|
73
|
-
from_address: string;
|
|
74
|
-
to_address: string | undefined;
|
|
75
80
|
amount: {
|
|
76
81
|
amount: string;
|
|
77
82
|
denom: string;
|
|
78
83
|
}[];
|
|
84
|
+
from_address: string;
|
|
85
|
+
to_address: string | undefined;
|
|
79
86
|
};
|
|
80
87
|
})[];
|
|
88
|
+
sequence: number;
|
|
89
|
+
}> | Promise<{
|
|
90
|
+
accountNumber: number;
|
|
91
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
81
92
|
fee: {
|
|
82
93
|
amount: {
|
|
83
|
-
denom: string;
|
|
84
94
|
amount: string;
|
|
95
|
+
denom: string;
|
|
85
96
|
}[];
|
|
86
97
|
gas: string;
|
|
87
98
|
};
|
|
88
99
|
memo: string;
|
|
89
|
-
}> | Promise<{
|
|
90
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
91
|
-
accountNumber: number;
|
|
92
|
-
sequence: number;
|
|
93
100
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
94
101
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
95
102
|
value: {
|
|
@@ -97,47 +104,47 @@ export declare function getCreateTransaction(rpcUrl: string): (params: Thorchain
|
|
|
97
104
|
amount: string;
|
|
98
105
|
asset: string;
|
|
99
106
|
}[];
|
|
100
|
-
signer: string;
|
|
101
107
|
memo: string;
|
|
108
|
+
signer: string;
|
|
102
109
|
};
|
|
103
110
|
})[];
|
|
111
|
+
sequence: number;
|
|
112
|
+
}>;
|
|
113
|
+
export declare const buildTransferTx: (rpcUrl: string) => ({ sender, recipient, assetValue, memo, asSignable, asAminoMessage, sequence, accountNumber, }: ThorchainCreateTransactionParams) => Promise<{
|
|
114
|
+
accountNumber: number;
|
|
115
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
104
116
|
fee: {
|
|
105
117
|
amount: {
|
|
106
|
-
denom: string;
|
|
107
118
|
amount: string;
|
|
119
|
+
denom: string;
|
|
108
120
|
}[];
|
|
109
121
|
gas: string;
|
|
110
122
|
};
|
|
111
123
|
memo: string;
|
|
112
|
-
}>;
|
|
113
|
-
export declare const buildTransferTx: (rpcUrl: string) => ({ sender, recipient, assetValue, memo, asSignable, asAminoMessage, sequence, accountNumber, }: ThorchainCreateTransactionParams) => Promise<{
|
|
114
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
115
|
-
accountNumber: number;
|
|
116
|
-
sequence: number;
|
|
117
124
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
118
125
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
119
126
|
value: {
|
|
120
|
-
from_address: string;
|
|
121
|
-
to_address: string | undefined;
|
|
122
127
|
amount: {
|
|
123
128
|
amount: string;
|
|
124
129
|
denom: string;
|
|
125
130
|
}[];
|
|
131
|
+
from_address: string;
|
|
132
|
+
to_address: string | undefined;
|
|
126
133
|
};
|
|
127
134
|
})[];
|
|
135
|
+
sequence: number;
|
|
136
|
+
}>;
|
|
137
|
+
export declare const buildDepositTx: (rpcUrl: string) => ({ sender, assetValue, memo, asSignable, asAminoMessage, sequence, accountNumber, }: ThorchainCreateTransactionParams) => Promise<{
|
|
138
|
+
accountNumber: number;
|
|
139
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
128
140
|
fee: {
|
|
129
141
|
amount: {
|
|
130
|
-
denom: string;
|
|
131
142
|
amount: string;
|
|
143
|
+
denom: string;
|
|
132
144
|
}[];
|
|
133
145
|
gas: string;
|
|
134
146
|
};
|
|
135
147
|
memo: string;
|
|
136
|
-
}>;
|
|
137
|
-
export declare const buildDepositTx: (rpcUrl: string) => ({ sender, assetValue, memo, asSignable, asAminoMessage, sequence, accountNumber, }: ThorchainCreateTransactionParams) => Promise<{
|
|
138
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
139
|
-
accountNumber: number;
|
|
140
|
-
sequence: number;
|
|
141
148
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
142
149
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
143
150
|
value: {
|
|
@@ -145,28 +152,21 @@ export declare const buildDepositTx: (rpcUrl: string) => ({ sender, assetValue,
|
|
|
145
152
|
amount: string;
|
|
146
153
|
asset: string;
|
|
147
154
|
}[];
|
|
148
|
-
signer: string;
|
|
149
155
|
memo: string;
|
|
156
|
+
signer: string;
|
|
150
157
|
};
|
|
151
158
|
})[];
|
|
152
|
-
|
|
153
|
-
amount: {
|
|
154
|
-
denom: string;
|
|
155
|
-
amount: string;
|
|
156
|
-
}[];
|
|
157
|
-
gas: string;
|
|
158
|
-
};
|
|
159
|
-
memo: string;
|
|
159
|
+
sequence: number;
|
|
160
160
|
}>;
|
|
161
161
|
export declare function parseAminoMessageForDirectSigning<T extends MsgDeposit | MsgSend>(msg: T): {
|
|
162
162
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
163
163
|
value: {
|
|
164
|
-
from_address: string;
|
|
165
|
-
to_address: string | undefined;
|
|
166
164
|
amount: {
|
|
167
165
|
amount: string;
|
|
168
166
|
denom: string;
|
|
169
167
|
}[];
|
|
168
|
+
from_address: string;
|
|
169
|
+
to_address: string | undefined;
|
|
170
170
|
};
|
|
171
171
|
} | (T & {
|
|
172
172
|
value: {
|
|
@@ -174,29 +174,29 @@ export declare function parseAminoMessageForDirectSigning<T extends MsgDeposit |
|
|
|
174
174
|
asset: {
|
|
175
175
|
chain: string | undefined;
|
|
176
176
|
symbol: string | undefined;
|
|
177
|
-
ticker: string;
|
|
178
177
|
synth: boolean;
|
|
178
|
+
ticker: string;
|
|
179
179
|
};
|
|
180
180
|
amount: string;
|
|
181
181
|
}[];
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
amount: {
|
|
185
|
-
amount: string;
|
|
186
|
-
denom: string;
|
|
187
|
-
}[];
|
|
182
|
+
memo: string;
|
|
183
|
+
signer: string;
|
|
188
184
|
} | {
|
|
189
185
|
coins: {
|
|
190
186
|
asset: {
|
|
191
187
|
chain: string | undefined;
|
|
192
188
|
symbol: string | undefined;
|
|
193
|
-
ticker: string;
|
|
194
189
|
synth: boolean;
|
|
190
|
+
ticker: string;
|
|
195
191
|
};
|
|
196
192
|
amount: string;
|
|
197
193
|
}[];
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
amount: {
|
|
195
|
+
amount: string;
|
|
196
|
+
denom: string;
|
|
197
|
+
}[];
|
|
198
|
+
from_address: string;
|
|
199
|
+
to_address: string | undefined;
|
|
200
200
|
};
|
|
201
201
|
});
|
|
202
202
|
export declare function buildEncodedTxBody({ chain, memo, msgs, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/thorchainUtils/messages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAgC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/thorchainUtils/messages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAgC,MAAM,kBAAkB,CAAC;AAKnF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACnD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AACrD,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/F,KAAK,4BAA4B,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,UAAU,CAAC,CAAC,CAAC;AAErG,eAAO,MAAM,mBAAmB,QAA0C,CAAC;AAC3E,eAAO,MAAM,cAAc,QAAqC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,GAAI,oCAI9B;IACD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB;;;;;;;;;;CAUA,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,+BAI7B;IACD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;;;;;;;;;;CAUA,CAAC;AAEF,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AAC;AAGzC,wBAAsB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/thorchainUtils/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,wBAAsB,qBAAqB,sDAY1C;AAED,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,kDAyBhF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { EncodeObject } from "@cosmjs/proto-signing";
|
|
2
|
-
import type { Asset, ChainId,
|
|
2
|
+
import type { Asset, ChainId, GenericTransferParams } from "@swapkit/helpers";
|
|
3
|
+
import type { CosmosCreateTransactionParams } from "../../types";
|
|
3
4
|
declare enum TxType {
|
|
4
5
|
Transfer = "transfer",
|
|
5
6
|
Unknown = "unknown"
|
|
@@ -52,10 +53,6 @@ export type TransferTransaction = {
|
|
|
52
53
|
gas: string;
|
|
53
54
|
};
|
|
54
55
|
};
|
|
55
|
-
export type CosmosCreateTransactionParams = GenericCreateTransactionParams & {
|
|
56
|
-
accountNumber?: number;
|
|
57
|
-
sequence?: number;
|
|
58
|
-
};
|
|
59
56
|
export type ThorchainCreateTransactionParams = Omit<CosmosCreateTransactionParams, "feeRate" | "recipient"> & {
|
|
60
57
|
recipient?: string;
|
|
61
58
|
asSignable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-types.d.ts","sourceRoot":"","sources":["../../../../../src/cosmos/thorchainUtils/types/client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client-types.d.ts","sourceRoot":"","sources":["../../../../../src/cosmos/thorchainUtils/types/client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB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AAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,6BAA6B,EAAE,SAAS,GAAG,WAAW,CAAC,GAAG;IAC5G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Account } from "@cosmjs/stargate";
|
|
2
2
|
import { AssetValue, Chain, type ChainId, type CosmosChain, type DerivationPathArray, type GenericTransferParams, SwapKitNumber } from "@swapkit/helpers";
|
|
3
3
|
import type { CosmosToolboxParams } from "../types";
|
|
4
|
+
import { cosmosCreateTransaction } from "../util";
|
|
4
5
|
export declare function fetchFeeRateFromSwapKit(chainId: ChainId, safeDefault: number): Promise<number>;
|
|
5
6
|
export declare function getSignerFromPhrase({ phrase, prefix, ...derivationParams }: {
|
|
6
7
|
phrase: string;
|
|
@@ -11,7 +12,7 @@ export declare function getSignerFromPhrase({ phrase, prefix, ...derivationParam
|
|
|
11
12
|
} | {
|
|
12
13
|
derivationPath: string;
|
|
13
14
|
})): Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
14
|
-
export declare function getSignerFromPrivateKey({ privateKey, prefix
|
|
15
|
+
export declare function getSignerFromPrivateKey({ privateKey, prefix }: {
|
|
15
16
|
privateKey: Uint8Array;
|
|
16
17
|
prefix: string;
|
|
17
18
|
}): Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
@@ -21,52 +22,29 @@ export declare function verifySignature(getAccount: (address: string) => Promise
|
|
|
21
22
|
address: string;
|
|
22
23
|
}) => Promise<boolean>;
|
|
23
24
|
export declare function createCosmosToolbox({ chain, ...toolboxParams }: CosmosToolboxParams): Promise<{
|
|
24
|
-
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
25
|
-
getAddress: () => Promise<string | undefined>;
|
|
26
|
-
getAccount: (address: string) => Promise<Account | null>;
|
|
27
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
28
|
-
getSignerFromPhrase: ({ phrase, derivationPath, }: {
|
|
29
|
-
phrase: string;
|
|
30
|
-
derivationPath: DerivationPathArray;
|
|
31
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
32
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
33
25
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
34
|
-
|
|
35
|
-
getPubKey: () => Promise<string>;
|
|
36
|
-
getFees: () => Promise<{
|
|
37
|
-
average: SwapKitNumber;
|
|
38
|
-
fast: SwapKitNumber;
|
|
39
|
-
fastest: SwapKitNumber;
|
|
40
|
-
}>;
|
|
26
|
+
createTransaction: typeof cosmosCreateTransaction;
|
|
41
27
|
fetchFeeRateFromSwapKit: typeof fetchFeeRateFromSwapKit;
|
|
28
|
+
getAccount: (address: string) => Promise<Account | null>;
|
|
29
|
+
getAddress: () => Promise<string | undefined>;
|
|
30
|
+
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
42
31
|
getBalanceAsDenoms: (address: string) => Promise<{
|
|
43
32
|
denom: string;
|
|
44
33
|
amount: string;
|
|
45
34
|
}[]>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
amount: {
|
|
51
|
-
denom: string;
|
|
52
|
-
amount: string;
|
|
53
|
-
}[];
|
|
54
|
-
gas: string;
|
|
55
|
-
};
|
|
56
|
-
memo: string;
|
|
57
|
-
sequence: number;
|
|
58
|
-
msgs: {
|
|
59
|
-
typeUrl: string;
|
|
60
|
-
value: {
|
|
61
|
-
fromAddress: string;
|
|
62
|
-
toAddress: string;
|
|
63
|
-
amount: {
|
|
64
|
-
amount: string;
|
|
65
|
-
denom: string;
|
|
66
|
-
}[];
|
|
67
|
-
};
|
|
68
|
-
}[];
|
|
35
|
+
getFees: () => Promise<{
|
|
36
|
+
average: SwapKitNumber;
|
|
37
|
+
fast: SwapKitNumber;
|
|
38
|
+
fastest: SwapKitNumber;
|
|
69
39
|
}>;
|
|
40
|
+
getPubKey: () => Promise<string>;
|
|
41
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
42
|
+
phrase: string;
|
|
43
|
+
derivationPath: DerivationPathArray;
|
|
44
|
+
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
45
|
+
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
46
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
47
|
+
validateAddress: (address: string) => boolean;
|
|
70
48
|
verifySignature: ({ signature, message, address, }: {
|
|
71
49
|
signature: string;
|
|
72
50
|
message: string;
|
|
@@ -87,7 +65,7 @@ export declare function cosmosValidateAddress({ address, chain, prefix: chainPre
|
|
|
87
65
|
chain: CosmosChain;
|
|
88
66
|
prefix?: undefined;
|
|
89
67
|
})): boolean;
|
|
90
|
-
export declare function estimateTransactionFee({ assetValue: { chain }
|
|
68
|
+
export declare function estimateTransactionFee({ assetValue: { chain } }: {
|
|
91
69
|
assetValue: AssetValue;
|
|
92
70
|
}): AssetValue;
|
|
93
71
|
//# sourceMappingURL=cosmos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/toolbox/cosmos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,O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AE,KAAK,EAAE,GAAG,aAAa,EAAE,EAAE,mBAAmB;yCAqM/B,MAAM;;;0BArL5B,MAAM;;0BAoDX,MAAM,yBAAyB,OAAO;kCAmHd,MAAM;;;;;;;;;;sDAlGF;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,mBAAmB,CAAA;KAAE;0CAOnE,UAAU;wEApDrD,qBAAqB;+BAgIiB,MAAM;wDAzL5C;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB;GAmHF;AAED,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAShF;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAE5D,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,KAAK,EACL,MAAM,EAAE,WAAW,GACpB,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,WAQ5G;AAED,wBAAgB,sBAAsB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,cAE3F"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Pubkey, Secp256k1HdWallet } from "@cosmjs/amino";
|
|
2
2
|
import { Chain, type GenericTransferParams, SwapKitNumber } from "@swapkit/helpers";
|
|
3
3
|
import { buildEncodedTxBody, createDefaultRegistry, parseAminoMessageForDirectSigning } from "../thorchainUtils";
|
|
4
|
-
import type { MultisigTx } from "../types";
|
|
5
|
-
import type { CosmosToolboxParams, MultiSigSigner } from "../types";
|
|
4
|
+
import type { CosmosToolboxParams, MultiSigSigner, MultisigTx } from "../types";
|
|
6
5
|
declare function createMultisig(pubKeys: string[], threshold: number, noSortPubKeys?: boolean): Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
7
6
|
declare function importSignature(signature: string): Uint8Array<ArrayBufferLike>;
|
|
8
|
-
declare function signWithPrivateKey({ privateKey, message
|
|
7
|
+
declare function signWithPrivateKey({ privateKey, message }: {
|
|
9
8
|
privateKey: Uint8Array;
|
|
10
9
|
message: string;
|
|
11
10
|
}): Promise<string>;
|
|
@@ -17,36 +16,36 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
17
16
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
18
17
|
memo?: string;
|
|
19
18
|
}) => {
|
|
20
|
-
type: "thorchain/
|
|
19
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
21
20
|
value: {
|
|
22
|
-
|
|
23
|
-
to_address: string | undefined;
|
|
24
|
-
amount: {
|
|
21
|
+
coins: {
|
|
25
22
|
amount: string;
|
|
26
|
-
|
|
23
|
+
asset: string;
|
|
27
24
|
}[];
|
|
25
|
+
memo: string;
|
|
26
|
+
signer: string;
|
|
28
27
|
};
|
|
29
28
|
} | {
|
|
30
|
-
type: "thorchain/
|
|
29
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
31
30
|
value: {
|
|
32
|
-
|
|
31
|
+
amount: {
|
|
33
32
|
amount: string;
|
|
34
|
-
|
|
33
|
+
denom: string;
|
|
35
34
|
}[];
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
from_address: string;
|
|
36
|
+
to_address: string | undefined;
|
|
38
37
|
};
|
|
39
38
|
};
|
|
40
39
|
buildEncodedTxBody: typeof buildEncodedTxBody;
|
|
41
40
|
convertToSignable: (msg: {
|
|
42
41
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
43
42
|
value: {
|
|
44
|
-
from_address: string;
|
|
45
|
-
to_address: string | undefined;
|
|
46
43
|
amount: {
|
|
47
44
|
amount: string;
|
|
48
45
|
denom: string;
|
|
49
46
|
}[];
|
|
47
|
+
from_address: string;
|
|
48
|
+
to_address: string | undefined;
|
|
50
49
|
};
|
|
51
50
|
} | {
|
|
52
51
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
@@ -55,40 +54,47 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
55
54
|
amount: string;
|
|
56
55
|
asset: string;
|
|
57
56
|
}[];
|
|
58
|
-
signer: string;
|
|
59
57
|
memo: string;
|
|
58
|
+
signer: string;
|
|
60
59
|
};
|
|
61
60
|
}, chain: Chain.THORChain | Chain.Maya) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
62
61
|
createDefaultAminoTypes: () => Promise<import("@cosmjs/stargate").AminoTypes>;
|
|
63
62
|
createDefaultRegistry: typeof createDefaultRegistry;
|
|
64
63
|
createMultisig: typeof createMultisig;
|
|
65
64
|
createTransaction: (params: import("..").ThorchainCreateTransactionParams) => Promise<{
|
|
66
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
67
65
|
accountNumber: number;
|
|
68
|
-
|
|
66
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
67
|
+
fee: {
|
|
68
|
+
amount: {
|
|
69
|
+
amount: string;
|
|
70
|
+
denom: string;
|
|
71
|
+
}[];
|
|
72
|
+
gas: string;
|
|
73
|
+
};
|
|
74
|
+
memo: string;
|
|
69
75
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
70
76
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
71
77
|
value: {
|
|
72
|
-
from_address: string;
|
|
73
|
-
to_address: string | undefined;
|
|
74
78
|
amount: {
|
|
75
79
|
amount: string;
|
|
76
80
|
denom: string;
|
|
77
81
|
}[];
|
|
82
|
+
from_address: string;
|
|
83
|
+
to_address: string | undefined;
|
|
78
84
|
};
|
|
79
85
|
})[];
|
|
86
|
+
sequence: number;
|
|
87
|
+
}> | Promise<{
|
|
88
|
+
accountNumber: number;
|
|
89
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
80
90
|
fee: {
|
|
81
91
|
amount: {
|
|
82
|
-
denom: string;
|
|
83
92
|
amount: string;
|
|
93
|
+
denom: string;
|
|
84
94
|
}[];
|
|
85
95
|
gas: string;
|
|
86
96
|
};
|
|
87
97
|
memo: string;
|
|
88
|
-
}> | Promise<{
|
|
89
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
90
|
-
accountNumber: number;
|
|
91
|
-
sequence: number;
|
|
92
98
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
93
99
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
94
100
|
value: {
|
|
@@ -96,18 +102,11 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
96
102
|
amount: string;
|
|
97
103
|
asset: string;
|
|
98
104
|
}[];
|
|
99
|
-
signer: string;
|
|
100
105
|
memo: string;
|
|
106
|
+
signer: string;
|
|
101
107
|
};
|
|
102
108
|
})[];
|
|
103
|
-
|
|
104
|
-
amount: {
|
|
105
|
-
denom: string;
|
|
106
|
-
amount: string;
|
|
107
|
-
}[];
|
|
108
|
-
gas: string;
|
|
109
|
-
};
|
|
110
|
-
memo: string;
|
|
109
|
+
sequence: number;
|
|
111
110
|
}>;
|
|
112
111
|
deposit: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
113
112
|
recipient?: string;
|
|
@@ -119,35 +118,35 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
119
118
|
}>;
|
|
120
119
|
importSignature: typeof importSignature;
|
|
121
120
|
parseAminoMessageForDirectSigning: typeof parseAminoMessageForDirectSigning;
|
|
121
|
+
pubkeyToAddress: (pubkey: Pubkey) => Promise<string>;
|
|
122
122
|
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<Secp256k1HdWallet>;
|
|
123
|
-
signMultisigTx: ({ wallet, tx
|
|
123
|
+
signMultisigTx: ({ wallet, tx }: {
|
|
124
124
|
wallet: Secp256k1HdWallet;
|
|
125
125
|
tx: string | MultisigTx;
|
|
126
126
|
}) => Promise<{
|
|
127
|
-
signature: string;
|
|
128
127
|
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
128
|
+
signature: string;
|
|
129
129
|
}>;
|
|
130
130
|
signWithPrivateKey: typeof signWithPrivateKey;
|
|
131
131
|
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
132
132
|
recipient?: string;
|
|
133
133
|
}) => Promise<string>;
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
135
|
+
fetchFeeRateFromSwapKit: typeof import("./cosmos").fetchFeeRateFromSwapKit;
|
|
136
136
|
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
137
|
+
getAddress: () => Promise<string | undefined>;
|
|
137
138
|
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
138
|
-
|
|
139
|
+
getBalanceAsDenoms: (address: string) => Promise<{
|
|
140
|
+
denom: string;
|
|
141
|
+
amount: string;
|
|
142
|
+
}[]>;
|
|
143
|
+
getPubKey: () => Promise<string>;
|
|
144
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
139
145
|
phrase: string;
|
|
140
146
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
141
147
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
142
148
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
143
|
-
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
144
149
|
validateAddress: (address: string) => boolean;
|
|
145
|
-
getPubKey: () => Promise<string>;
|
|
146
|
-
fetchFeeRateFromSwapKit: typeof import("./cosmos").fetchFeeRateFromSwapKit;
|
|
147
|
-
getBalanceAsDenoms: (address: string) => Promise<{
|
|
148
|
-
denom: string;
|
|
149
|
-
amount: string;
|
|
150
|
-
}[]>;
|
|
151
150
|
verifySignature: ({ signature, message, address, }: {
|
|
152
151
|
signature: string;
|
|
153
152
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thorchain.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/toolbox/thorchain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"thorchain.d.ts","sourceRoot":"","sources":["../../../../src/cosmos/toolbox/thorchain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAEL,KAAK,EAIL,KAAK,qBAAqB,EAM1B,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAEL,kBAAkB,EAGlB,qBAAqB,EAErB,iCAAiC,EAClC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAoFhF,iBAAe,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,UAAO,4DAOvF;AAED,iBAAS,eAAe,CAAC,SAAS,EAAE,MAAM,+BAEzC;AAED,iBAAe,kBAAkB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,mBAKrG;AAED,wBAAsB,sBAAsB,CAAC,EAC3C,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,mBAAmB,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;8BAxD5C,MAAM,WACD,cAAc,EAAE,kBACT,MAAM,EAAE,aACb,MAAM,aACN,UAAU;;;iBA7BoB,CAAC;;YAA2C,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAkIpF,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;8BAqDlC,MAAM;8CAvMsB,MAAM;qCAef;QAAE,MAAM,EAAE,iBAAiB,CAAC;QAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE;;;;;iDAmIxG,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;GAiErE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OfflineAminoSigner } from "@cosmjs/amino";
|
|
2
2
|
import type { DirectSecp256k1HdWallet, OfflineDirectSigner } from "@cosmjs/proto-signing";
|
|
3
|
-
import type { Chain, ChainId, CosmosChain, DerivationPathArray } from "@swapkit/helpers";
|
|
3
|
+
import type { Chain, ChainId, CosmosChain, DerivationPathArray, GenericCreateTransactionParams } from "@swapkit/helpers";
|
|
4
4
|
import type { buildAminoMsg } from "./thorchainUtils";
|
|
5
5
|
import type { createCosmosToolbox } from "./toolbox/cosmos";
|
|
6
6
|
import type { createThorchainToolbox } from "./toolbox/thorchain";
|
|
@@ -11,6 +11,10 @@ export type CosmosSDKClientParams = {
|
|
|
11
11
|
prefix?: string;
|
|
12
12
|
stagenet?: boolean;
|
|
13
13
|
};
|
|
14
|
+
export type CosmosCreateTransactionParams = GenericCreateTransactionParams & {
|
|
15
|
+
accountNumber?: number;
|
|
16
|
+
sequence?: number;
|
|
17
|
+
};
|
|
14
18
|
export type MultiSigSigner = {
|
|
15
19
|
pubKey: string;
|
|
16
20
|
signature: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cosmos/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cosmos/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAC9G,MAAM,MAAM,6BAA6B,GAAG,8BAA8B,GAAG;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CA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