@swapkit/toolboxes 4.15.5 → 4.15.7
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 +1 -1
- package/dist/src/cosmos/index.js +1 -1
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.js +1 -1
- package/dist/types/cosmos/thorchainUtils/messages.d.ts +9 -9
- package/dist/types/cosmos/toolbox/thorchain.d.ts +7 -6
- package/dist/types/cosmos/toolbox/thorchain.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export declare const transferMsgAmino: ({ sender, recipient, assetValue, }: {
|
|
|
11
11
|
recipient?: string;
|
|
12
12
|
assetValue: AssetValue;
|
|
13
13
|
}) => {
|
|
14
|
-
type: "
|
|
14
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
15
15
|
value: {
|
|
16
16
|
amount: {
|
|
17
17
|
amount: string;
|
|
@@ -26,7 +26,7 @@ export declare const depositMsgAmino: ({ sender, assetValue, memo, }: {
|
|
|
26
26
|
assetValue: AssetValue;
|
|
27
27
|
memo?: string;
|
|
28
28
|
}) => {
|
|
29
|
-
type: "
|
|
29
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
30
30
|
value: {
|
|
31
31
|
coins: {
|
|
32
32
|
amount: string;
|
|
@@ -42,7 +42,7 @@ export declare const buildAminoMsg: ({ sender, recipient, assetValue, memo, }: {
|
|
|
42
42
|
assetValue: AssetValue;
|
|
43
43
|
memo?: string;
|
|
44
44
|
}) => {
|
|
45
|
-
type: "
|
|
45
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
46
46
|
value: {
|
|
47
47
|
coins: {
|
|
48
48
|
amount: string;
|
|
@@ -52,7 +52,7 @@ export declare const buildAminoMsg: ({ sender, recipient, assetValue, memo, }: {
|
|
|
52
52
|
signer: string;
|
|
53
53
|
};
|
|
54
54
|
} | {
|
|
55
|
-
type: "
|
|
55
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
56
56
|
value: {
|
|
57
57
|
amount: {
|
|
58
58
|
amount: string;
|
|
@@ -75,7 +75,7 @@ export declare function createTransaction(params: ThorchainCreateTransactionPara
|
|
|
75
75
|
};
|
|
76
76
|
memo: string;
|
|
77
77
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
78
|
-
type: "
|
|
78
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
79
79
|
value: {
|
|
80
80
|
amount: {
|
|
81
81
|
amount: string;
|
|
@@ -98,7 +98,7 @@ export declare function createTransaction(params: ThorchainCreateTransactionPara
|
|
|
98
98
|
};
|
|
99
99
|
memo: string;
|
|
100
100
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
101
|
-
type: "
|
|
101
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
102
102
|
value: {
|
|
103
103
|
coins: {
|
|
104
104
|
amount: string;
|
|
@@ -122,7 +122,7 @@ export declare function buildTransferTx({ sender, recipient, assetValue, memo, a
|
|
|
122
122
|
};
|
|
123
123
|
memo: string;
|
|
124
124
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
125
|
-
type: "
|
|
125
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
126
126
|
value: {
|
|
127
127
|
amount: {
|
|
128
128
|
amount: string;
|
|
@@ -146,7 +146,7 @@ export declare function buildDepositTx({ sender, assetValue, memo, asSignable, a
|
|
|
146
146
|
};
|
|
147
147
|
memo: string;
|
|
148
148
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
149
|
-
type: "
|
|
149
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
150
150
|
value: {
|
|
151
151
|
coins: {
|
|
152
152
|
amount: string;
|
|
@@ -159,7 +159,7 @@ export declare function buildDepositTx({ sender, assetValue, memo, asSignable, a
|
|
|
159
159
|
sequence: number;
|
|
160
160
|
}>;
|
|
161
161
|
export declare function parseAminoMessageForDirectSigning<T extends MsgDeposit | MsgSend>(msg: T): {
|
|
162
|
-
type: "
|
|
162
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
163
163
|
value: {
|
|
164
164
|
amount: {
|
|
165
165
|
amount: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Pubkey, Secp256k1HdWallet } from "@cosmjs/amino";
|
|
2
2
|
import { type GenericTransferParams, SwapKitNumber, type TCLikeChain } from "@swapkit/helpers";
|
|
3
|
+
import type { CosmosTransaction } from "@swapkit/helpers/api";
|
|
3
4
|
import { buildEncodedTxBody, createDefaultRegistry, createTransaction, parseAminoMessageForDirectSigning } from "../thorchainUtils";
|
|
4
5
|
import type { CosmosToolboxParams, MultiSigSigner, MultisigTx } from "../types";
|
|
5
6
|
declare function createMultisig(pubKeys: string[], threshold: number, noSortPubKeys?: boolean): Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
@@ -16,7 +17,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
16
17
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
17
18
|
memo?: string;
|
|
18
19
|
}) => {
|
|
19
|
-
type: "
|
|
20
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
20
21
|
value: {
|
|
21
22
|
coins: {
|
|
22
23
|
amount: string;
|
|
@@ -26,7 +27,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
26
27
|
signer: string;
|
|
27
28
|
};
|
|
28
29
|
} | {
|
|
29
|
-
type: "
|
|
30
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
30
31
|
value: {
|
|
31
32
|
amount: {
|
|
32
33
|
amount: string;
|
|
@@ -38,7 +39,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
38
39
|
};
|
|
39
40
|
buildEncodedTxBody: typeof buildEncodedTxBody;
|
|
40
41
|
convertToSignable: (msg: {
|
|
41
|
-
type: "
|
|
42
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
42
43
|
value: {
|
|
43
44
|
amount: {
|
|
44
45
|
amount: string;
|
|
@@ -48,7 +49,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
48
49
|
to_address: string | undefined;
|
|
49
50
|
};
|
|
50
51
|
} | {
|
|
51
|
-
type: "
|
|
52
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
52
53
|
value: {
|
|
53
54
|
coins: {
|
|
54
55
|
amount: string;
|
|
@@ -74,6 +75,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
74
75
|
parseAminoMessageForDirectSigning: typeof parseAminoMessageForDirectSigning;
|
|
75
76
|
pubkeyToAddress: (pubkey: Pubkey) => Promise<string>;
|
|
76
77
|
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<Secp256k1HdWallet>;
|
|
78
|
+
signAndBroadcastTransaction: ({ fee, memo, msgs }: Pick<CosmosTransaction, "fee" | "memo" | "msgs">) => Promise<string>;
|
|
77
79
|
signMultisigTx: ({ wallet, tx }: {
|
|
78
80
|
wallet: Secp256k1HdWallet;
|
|
79
81
|
tx: string | MultisigTx;
|
|
@@ -81,6 +83,7 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
81
83
|
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
82
84
|
signature: string;
|
|
83
85
|
}>;
|
|
86
|
+
signTransaction: (transaction: CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
84
87
|
signWithPrivateKey: typeof signWithPrivateKey;
|
|
85
88
|
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
86
89
|
recipient?: string;
|
|
@@ -100,8 +103,6 @@ export declare function createThorchainToolbox({ chain, ...toolboxParams }: Cosm
|
|
|
100
103
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
101
104
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
102
105
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
103
|
-
signAndBroadcastTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<string>;
|
|
104
|
-
signTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
105
106
|
validateAddress: (address: string) => boolean;
|
|
106
107
|
verifySignature: ({ signature, message, address, }: {
|
|
107
108
|
signature: 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,EAKL,KAAK,qBAAqB,EAO1B,aAAa,EACb,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAC;
|
|
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,EAKL,KAAK,qBAAqB,EAO1B,aAAa,EACb,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,EAEL,kBAAkB,EAGlB,qBAAqB,EACrB,iBAAiB,EACjB,iCAAiC,EAClC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAgB,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,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