@sodax/types 1.5.7-beta → 2.0.0-rc.10
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/README.md +86 -20
- package/dist/backend/backendApi.d.ts +74 -0
- package/dist/backend/backendApi.js +1 -0
- package/dist/backend/index.d.ts +1 -81
- package/dist/backend/index.js +1 -2
- package/dist/{btc/index.d.ts → bitcoin/bitcoin.d.ts} +30 -31
- package/dist/{btc/index.js → bitcoin/bitcoin.js} +4 -4
- package/dist/bitcoin/index.d.ts +1 -0
- package/dist/bitcoin/index.js +1 -0
- package/dist/chains/chain-keys.d.ts +30 -0
- package/dist/chains/chain-keys.js +38 -0
- package/dist/chains/chains.d.ts +3602 -0
- package/dist/chains/chains.js +711 -0
- package/dist/chains/index.d.ts +2 -0
- package/dist/chains/index.js +2 -0
- package/dist/chains/tokens.d.ts +4617 -0
- package/dist/chains/tokens.js +2242 -0
- package/dist/common/common.d.ts +281 -0
- package/dist/common/common.js +29 -0
- package/dist/common/constants.d.ts +69 -0
- package/dist/common/constants.js +30 -0
- package/dist/common/index.d.ts +2 -275
- package/dist/common/index.js +2 -2
- package/dist/dex/dex.d.ts +267 -0
- package/dist/dex/dex.js +127 -0
- package/dist/dex/index.d.ts +1 -0
- package/dist/dex/index.js +1 -0
- package/dist/dex/pancakeswap-infinity.d.ts +538 -0
- package/dist/dex/pancakeswap-infinity.js +2 -0
- package/dist/evm/evm.d.ts +47 -0
- package/dist/evm/evm.js +1 -0
- package/dist/evm/index.d.ts +1 -40
- package/dist/evm/index.js +1 -2
- package/dist/icon/icon.d.ts +54 -0
- package/dist/icon/icon.js +1 -0
- package/dist/icon/index.d.ts +1 -36
- package/dist/icon/index.js +1 -2
- package/dist/index.d.ts +15 -8
- package/dist/index.js +15 -8
- package/dist/injective/index.d.ts +1 -68
- package/dist/injective/index.js +1 -17
- package/dist/injective/injective.d.ts +102 -0
- package/dist/injective/injective.js +1 -0
- package/dist/moneyMarket/index.d.ts +1 -0
- package/dist/moneyMarket/index.js +1 -0
- package/dist/moneyMarket/moneyMarket.d.ts +2559 -0
- package/dist/moneyMarket/moneyMarket.js +199 -0
- package/dist/near/index.d.ts +1 -70
- package/dist/near/index.js +1 -2
- package/dist/near/near-api-js.d.ts +6118 -0
- package/dist/near/near-api-js.js +1 -0
- package/dist/near/near.d.ts +74 -0
- package/dist/near/near.js +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/shared.d.ts +16 -0
- package/dist/shared/shared.js +5 -0
- package/dist/sodax-config/index.d.ts +1 -0
- package/dist/sodax-config/index.js +1 -0
- package/dist/sodax-config/sodax-config.d.ts +6307 -0
- package/dist/sodax-config/sodax-config.js +21 -0
- package/dist/solana/index.d.ts +1 -100
- package/dist/solana/index.js +1 -2
- package/dist/solana/solana-web3.d.ts +389 -0
- package/dist/solana/solana-web3.js +1 -0
- package/dist/solana/solana.d.ts +110 -0
- package/dist/solana/solana.js +1 -0
- package/dist/stacks/index.d.ts +1 -17
- package/dist/stacks/index.js +1 -2
- package/dist/stacks/stacks.d.ts +210 -0
- package/dist/stacks/stacks.js +1 -0
- package/dist/stellar/index.d.ts +1 -70
- package/dist/stellar/index.js +1 -2
- package/dist/stellar/stellar.d.ts +96 -0
- package/dist/stellar/stellar.js +1 -0
- package/dist/sui/index.d.ts +1 -33
- package/dist/sui/index.js +1 -2
- package/dist/sui/sui.d.ts +311 -0
- package/dist/sui/sui.js +1 -0
- package/dist/swap/index.d.ts +1 -0
- package/dist/swap/index.js +1 -0
- package/dist/swap/swap.d.ts +3500 -0
- package/dist/swap/swap.js +248 -0
- package/dist/utils/deep-partial.d.ts +8 -0
- package/dist/utils/deep-partial.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/utils.d.ts +60 -0
- package/dist/utils/utils.js +143 -0
- package/dist/wallet/index.d.ts +2 -0
- package/dist/wallet/index.js +2 -0
- package/dist/wallet/providers.d.ts +23 -0
- package/dist/wallet/providers.js +1 -0
- package/dist/wallet/wallet.d.ts +18 -0
- package/dist/wallet/wallet.js +1 -0
- package/package.json +42 -14
- package/dist/backend/index.d.ts.map +0 -1
- package/dist/backend/index.js.map +0 -1
- package/dist/btc/index.d.ts.map +0 -1
- package/dist/btc/index.js.map +0 -1
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js.map +0 -1
- package/dist/constants/index.d.ts +0 -7299
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/constants/index.js +0 -3227
- package/dist/constants/index.js.map +0 -1
- package/dist/evm/index.d.ts.map +0 -1
- package/dist/evm/index.js.map +0 -1
- package/dist/icon/index.d.ts.map +0 -1
- package/dist/icon/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/injective/index.d.ts.map +0 -1
- package/dist/injective/index.js.map +0 -1
- package/dist/near/index.d.ts.map +0 -1
- package/dist/near/index.js.map +0 -1
- package/dist/solana/index.d.ts.map +0 -1
- package/dist/solana/index.js.map +0 -1
- package/dist/stacks/index.d.ts.map +0 -1
- package/dist/stacks/index.js.map +0 -1
- package/dist/stellar/index.d.ts.map +0 -1
- package/dist/stellar/index.js.map +0 -1
- package/dist/sui/index.d.ts.map +0 -1
- package/dist/sui/index.js.map +0 -1
package/dist/icon/index.d.ts
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export type IconEoaAddress = `hx${string}`;
|
|
3
|
-
export type IcxCallTransaction = {
|
|
4
|
-
to: string;
|
|
5
|
-
from: string;
|
|
6
|
-
nid: Hex;
|
|
7
|
-
value: Hex;
|
|
8
|
-
method: string;
|
|
9
|
-
params: object;
|
|
10
|
-
version?: Hex;
|
|
11
|
-
timestamp?: number;
|
|
12
|
-
};
|
|
13
|
-
export type IconTransactionResult = {
|
|
14
|
-
status: number;
|
|
15
|
-
to: string;
|
|
16
|
-
txHash: string;
|
|
17
|
-
txIndex: number;
|
|
18
|
-
blockHeight: number;
|
|
19
|
-
blockHash: string;
|
|
20
|
-
cumulativeStepUsed: bigint;
|
|
21
|
-
stepUsed: bigint;
|
|
22
|
-
stepPrice: bigint;
|
|
23
|
-
scoreAddress?: string;
|
|
24
|
-
eventLogs?: unknown;
|
|
25
|
-
logsBloom?: unknown;
|
|
26
|
-
failure?: {
|
|
27
|
-
code: string;
|
|
28
|
-
message: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export interface IIconWalletProvider extends WalletAddressProvider {
|
|
32
|
-
getWalletAddress: () => Promise<IconEoaAddress>;
|
|
33
|
-
sendTransaction: (iconRawTx: IcxCallTransaction) => Promise<Hash>;
|
|
34
|
-
waitForTransactionReceipt: (txHash: Hash) => Promise<IconTransactionResult>;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './icon.js';
|
package/dist/icon/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from './icon.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './shared/index.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
|
+
export * from './chains/index.js';
|
|
4
|
+
export * from './sodax-config/index.js';
|
|
5
|
+
export * from './backend/index.js';
|
|
6
|
+
export * from './bitcoin/index.js';
|
|
7
|
+
export * from './dex/index.js';
|
|
2
8
|
export * from './evm/index.js';
|
|
3
|
-
export * from './sui/index.js';
|
|
4
9
|
export * from './icon/index.js';
|
|
5
|
-
export * from './constants/index.js';
|
|
6
|
-
export * from './common/index.js';
|
|
7
10
|
export * from './injective/index.js';
|
|
8
|
-
export * from './
|
|
11
|
+
export * from './moneyMarket/index.js';
|
|
9
12
|
export * from './near/index.js';
|
|
10
|
-
export * from './
|
|
13
|
+
export * from './solana/index.js';
|
|
11
14
|
export * from './stacks/index.js';
|
|
12
|
-
export * from './
|
|
13
|
-
|
|
15
|
+
export * from './stellar/index.js';
|
|
16
|
+
export * from './sui/index.js';
|
|
17
|
+
export * from './swap/index.js';
|
|
18
|
+
export * from './utils/index.js';
|
|
19
|
+
export * from './wallet/index.js';
|
|
20
|
+
export declare const CONFIG_VERSION = 208;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './shared/index.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
|
+
export * from './chains/index.js';
|
|
4
|
+
export * from './sodax-config/index.js';
|
|
5
|
+
export * from './backend/index.js';
|
|
6
|
+
export * from './bitcoin/index.js';
|
|
7
|
+
export * from './dex/index.js';
|
|
2
8
|
export * from './evm/index.js';
|
|
3
|
-
export * from './sui/index.js';
|
|
4
9
|
export * from './icon/index.js';
|
|
5
|
-
export * from './constants/index.js';
|
|
6
|
-
export * from './common/index.js';
|
|
7
10
|
export * from './injective/index.js';
|
|
8
|
-
export * from './
|
|
11
|
+
export * from './moneyMarket/index.js';
|
|
9
12
|
export * from './near/index.js';
|
|
10
|
-
export * from './
|
|
13
|
+
export * from './solana/index.js';
|
|
11
14
|
export * from './stacks/index.js';
|
|
12
|
-
export * from './
|
|
13
|
-
|
|
15
|
+
export * from './stellar/index.js';
|
|
16
|
+
export * from './sui/index.js';
|
|
17
|
+
export * from './swap/index.js';
|
|
18
|
+
export * from './utils/index.js';
|
|
19
|
+
export * from './wallet/index.js';
|
|
20
|
+
export const CONFIG_VERSION = 208; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
|
|
@@ -1,68 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface SignDoc {
|
|
3
|
-
/**
|
|
4
|
-
* body_bytes is protobuf serialization of a TxBody that matches the
|
|
5
|
-
* representation in TxRaw.
|
|
6
|
-
*/
|
|
7
|
-
bodyBytes: Uint8Array;
|
|
8
|
-
/**
|
|
9
|
-
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
|
|
10
|
-
* representation in TxRaw.
|
|
11
|
-
*/
|
|
12
|
-
authInfoBytes: Uint8Array;
|
|
13
|
-
/**
|
|
14
|
-
* chain_id is the unique identifier of the chain this transaction targets.
|
|
15
|
-
* It prevents signed transactions from being used on another chain by an
|
|
16
|
-
* attacker
|
|
17
|
-
*/
|
|
18
|
-
chainId: string;
|
|
19
|
-
/** account_number is the account number of the account in state */
|
|
20
|
-
accountNumber: bigint;
|
|
21
|
-
}
|
|
22
|
-
export type JsonObject = unknown;
|
|
23
|
-
export type InjectiveNetworkEnv = 'TestNet' | 'DevNet' | 'Mainnet';
|
|
24
|
-
export type InjectiveEoaAddress = string;
|
|
25
|
-
export interface InjectiveCoin {
|
|
26
|
-
readonly denom: string;
|
|
27
|
-
readonly amount: string;
|
|
28
|
-
}
|
|
29
|
-
export interface InjectiveExecuteResult {
|
|
30
|
-
readonly logs: readonly unknown[];
|
|
31
|
-
/** Block height in which the transaction is included */
|
|
32
|
-
readonly height: number;
|
|
33
|
-
/** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */
|
|
34
|
-
readonly transactionHash: string;
|
|
35
|
-
readonly events: readonly unknown[];
|
|
36
|
-
readonly gasWanted: bigint;
|
|
37
|
-
readonly gasUsed: bigint;
|
|
38
|
-
}
|
|
39
|
-
export interface InjectiveTxResponse {
|
|
40
|
-
height: number;
|
|
41
|
-
txHash: string;
|
|
42
|
-
codespace: string;
|
|
43
|
-
code: number;
|
|
44
|
-
data?: string;
|
|
45
|
-
rawLog: string;
|
|
46
|
-
logs?: unknown[];
|
|
47
|
-
info?: string;
|
|
48
|
-
gasWanted: number;
|
|
49
|
-
gasUsed: number;
|
|
50
|
-
timestamp: string;
|
|
51
|
-
events?: unknown[];
|
|
52
|
-
}
|
|
53
|
-
export type InjectiveRawTransaction = {
|
|
54
|
-
from: Hex;
|
|
55
|
-
to: Hex;
|
|
56
|
-
signedDoc: SignDoc;
|
|
57
|
-
};
|
|
58
|
-
export declare class InjectiveExecuteResponse {
|
|
59
|
-
height: number | undefined;
|
|
60
|
-
transactionHash: string;
|
|
61
|
-
static fromExecResult(res: InjectiveExecuteResult): InjectiveExecuteResponse;
|
|
62
|
-
static fromTxResponse(res: InjectiveTxResponse): InjectiveExecuteResponse;
|
|
63
|
-
}
|
|
64
|
-
export interface IInjectiveWalletProvider extends WalletAddressProvider {
|
|
65
|
-
getWalletAddress: () => Promise<InjectiveEoaAddress>;
|
|
66
|
-
execute: (senderAddress: InjectiveEoaAddress, contractAddress: string, msg: JsonObject, funds?: InjectiveCoin[]) => Promise<InjectiveExecuteResponse>;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './injective.js';
|
package/dist/injective/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
height;
|
|
3
|
-
transactionHash;
|
|
4
|
-
static fromExecResult(res) {
|
|
5
|
-
const response = new InjectiveExecuteResponse();
|
|
6
|
-
response.height = res.height;
|
|
7
|
-
response.transactionHash = res.transactionHash;
|
|
8
|
-
return response;
|
|
9
|
-
}
|
|
10
|
-
static fromTxResponse(res) {
|
|
11
|
-
const response = new InjectiveExecuteResponse();
|
|
12
|
-
response.height = res.height;
|
|
13
|
-
response.transactionHash = res.txHash;
|
|
14
|
-
return response;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from './injective.js';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ICoreWallet } from '../wallet/wallet.js';
|
|
2
|
+
export interface SignDoc {
|
|
3
|
+
/**
|
|
4
|
+
* body_bytes is protobuf serialization of a TxBody that matches the
|
|
5
|
+
* representation in TxRaw.
|
|
6
|
+
*/
|
|
7
|
+
bodyBytes: Uint8Array;
|
|
8
|
+
/**
|
|
9
|
+
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
|
|
10
|
+
* representation in TxRaw.
|
|
11
|
+
*/
|
|
12
|
+
authInfoBytes: Uint8Array;
|
|
13
|
+
/**
|
|
14
|
+
* chain_id is the unique identifier of the chain this transaction targets.
|
|
15
|
+
* It prevents signed transactions from being used on another chain by an
|
|
16
|
+
* attacker
|
|
17
|
+
*/
|
|
18
|
+
chainId: string;
|
|
19
|
+
/** account_number is the account number of the account in state */
|
|
20
|
+
accountNumber: bigint;
|
|
21
|
+
}
|
|
22
|
+
export type JsonObject = unknown;
|
|
23
|
+
export type InjectiveEoaAddress = string;
|
|
24
|
+
export interface InjectiveCoin {
|
|
25
|
+
readonly denom: string;
|
|
26
|
+
readonly amount: string;
|
|
27
|
+
}
|
|
28
|
+
export interface InjectiveExecuteResult {
|
|
29
|
+
readonly logs: readonly unknown[];
|
|
30
|
+
/** Block height in which the transaction is included */
|
|
31
|
+
readonly height: number;
|
|
32
|
+
/** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */
|
|
33
|
+
readonly transactionHash: string;
|
|
34
|
+
readonly events: readonly unknown[];
|
|
35
|
+
readonly gasWanted: bigint;
|
|
36
|
+
readonly gasUsed: bigint;
|
|
37
|
+
}
|
|
38
|
+
export interface InjectiveTxResponse {
|
|
39
|
+
height: number;
|
|
40
|
+
txHash: string;
|
|
41
|
+
codespace: string;
|
|
42
|
+
code: number;
|
|
43
|
+
data?: string;
|
|
44
|
+
rawLog: string;
|
|
45
|
+
logs?: unknown[];
|
|
46
|
+
info?: string;
|
|
47
|
+
gasWanted: number;
|
|
48
|
+
gasUsed: number;
|
|
49
|
+
timestamp: string;
|
|
50
|
+
events?: unknown[];
|
|
51
|
+
}
|
|
52
|
+
export type InjectiveReturnType<Raw extends boolean> = Raw extends true ? InjectiveRawTransaction : Raw extends false ? string : InjectiveRawTransaction | string;
|
|
53
|
+
export type InjectiveRawTransaction = {
|
|
54
|
+
from: `0x${string}`;
|
|
55
|
+
to: `0x${string}`;
|
|
56
|
+
signedDoc: SignDoc;
|
|
57
|
+
};
|
|
58
|
+
export type InjectiveExecuteResponse = {
|
|
59
|
+
height: number | undefined;
|
|
60
|
+
transactionHash: string;
|
|
61
|
+
};
|
|
62
|
+
export type InjectiveEventAttribute = {
|
|
63
|
+
key: string;
|
|
64
|
+
value: string;
|
|
65
|
+
index: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type InjectiveEvent = {
|
|
68
|
+
type: string;
|
|
69
|
+
attributes: InjectiveEventAttribute[];
|
|
70
|
+
};
|
|
71
|
+
export type InjectiveStringEvent = {
|
|
72
|
+
type: string;
|
|
73
|
+
attributes: {
|
|
74
|
+
key: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
export type InjectiveTxLog = {
|
|
79
|
+
msg_index: number;
|
|
80
|
+
log: string;
|
|
81
|
+
events: InjectiveStringEvent[];
|
|
82
|
+
};
|
|
83
|
+
/** Mirrors `TxResponse` from `@injectivelabs/sdk-ts` (Cosmos SDK). */
|
|
84
|
+
export type InjectiveRawTransactionReceipt = {
|
|
85
|
+
txHash: string;
|
|
86
|
+
height: number;
|
|
87
|
+
code: number;
|
|
88
|
+
codespace: string;
|
|
89
|
+
data?: string;
|
|
90
|
+
rawLog: string;
|
|
91
|
+
info?: string;
|
|
92
|
+
gasWanted: number;
|
|
93
|
+
gasUsed: number;
|
|
94
|
+
logs?: InjectiveTxLog[];
|
|
95
|
+
events?: InjectiveEvent[];
|
|
96
|
+
timestamp: string;
|
|
97
|
+
};
|
|
98
|
+
export interface IInjectiveWalletProvider extends ICoreWallet {
|
|
99
|
+
readonly chainType: 'INJECTIVE';
|
|
100
|
+
getWalletAddress: () => Promise<InjectiveEoaAddress>;
|
|
101
|
+
execute: (senderAddress: InjectiveEoaAddress, contractAddress: string, msg: JsonObject, funds?: InjectiveCoin[]) => Promise<InjectiveExecuteResponse>;
|
|
102
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './moneyMarket.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './moneyMarket.js';
|