rango-sdk 0.0.9 → 0.1.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/{LICENSE → lib/LICENSE} +0 -0
- package/{README.md → lib/README.md} +18 -3
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -21
- package/lib/package.json +37 -0
- package/lib/rango-sdk.cjs.development.js +612 -0
- package/lib/rango-sdk.cjs.development.js.map +1 -0
- package/lib/rango-sdk.cjs.production.min.js +2 -0
- package/lib/rango-sdk.cjs.production.min.js.map +1 -0
- package/lib/rango-sdk.esm.js +611 -0
- package/lib/rango-sdk.esm.js.map +1 -0
- package/lib/services/client.d.ts +18 -18
- package/lib/services/client.d.ts.map +1 -1
- package/lib/services/httpService.d.ts +1 -1
- package/lib/services/httpService.d.ts.map +1 -1
- package/lib/services/index.d.ts +1 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/types/api/balance.d.ts +1 -38
- package/lib/types/api/balance.d.ts.map +1 -1
- package/lib/types/api/common.d.ts +1 -222
- package/lib/types/api/common.d.ts.map +1 -1
- package/lib/types/api/meta.d.ts +1 -165
- package/lib/types/api/meta.d.ts.map +1 -1
- package/lib/types/api/routing.d.ts +1 -146
- package/lib/types/api/routing.d.ts.map +1 -1
- package/lib/types/api/transactions.d.ts +1 -180
- package/lib/types/api/transactions.d.ts.map +1 -1
- package/lib/types/api/txs/cosmos.d.ts +1 -65
- package/lib/types/api/txs/cosmos.d.ts.map +1 -1
- package/lib/types/api/txs/evm.d.ts +1 -28
- package/lib/types/api/txs/evm.d.ts.map +1 -1
- package/lib/types/api/txs/index.d.ts +4 -4
- package/lib/types/api/txs/index.d.ts.map +1 -1
- package/lib/types/api/txs/solana.d.ts +1 -45
- package/lib/types/api/txs/solana.d.ts.map +1 -1
- package/lib/types/api/txs/transfer.d.ts +1 -23
- package/lib/types/api/txs/transfer.d.ts.map +1 -1
- package/lib/types/index.d.ts +6 -6
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +14 -25
- package/lib/index.js.map +0 -1
- package/lib/services/client.js +0 -164
- package/lib/services/client.js.map +0 -1
- package/lib/services/httpService.js +0 -11
- package/lib/services/httpService.js.map +0 -1
- package/lib/services/index.js +0 -6
- package/lib/services/index.js.map +0 -1
- package/lib/types/api/balance.js +0 -3
- package/lib/types/api/balance.js.map +0 -1
- package/lib/types/api/common.js +0 -3
- package/lib/types/api/common.js.map +0 -1
- package/lib/types/api/meta.js +0 -3
- package/lib/types/api/meta.js.map +0 -1
- package/lib/types/api/routing.js +0 -3
- package/lib/types/api/routing.js.map +0 -1
- package/lib/types/api/transactions.js +0 -23
- package/lib/types/api/transactions.js.map +0 -1
- package/lib/types/api/txs/cosmos.js +0 -3
- package/lib/types/api/txs/cosmos.js.map +0 -1
- package/lib/types/api/txs/evm.js +0 -3
- package/lib/types/api/txs/evm.js.map +0 -1
- package/lib/types/api/txs/index.js +0 -21
- package/lib/types/api/txs/index.js.map +0 -1
- package/lib/types/api/txs/solana.js +0 -3
- package/lib/types/api/txs/solana.js.map +0 -1
- package/lib/types/api/txs/transfer.js +0 -3
- package/lib/types/api/txs/transfer.js.map +0 -1
- package/lib/types/index.js +0 -23
- package/lib/types/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/types/api/routing.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA"}
|
|
@@ -1,181 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* The type of transaction
|
|
3
|
-
*/
|
|
4
|
-
export declare enum TransactionType {
|
|
5
|
-
EVM = "EVM",
|
|
6
|
-
TRANSFER = "TRANSFER",
|
|
7
|
-
COSMOS = "COSMOS",
|
|
8
|
-
SOLANA = "SOLANA"
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Parent model for all types of transactions
|
|
12
|
-
* Check EvmTransaction, TransferTransaction and CosmosTransaction models for more details
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare type GenericTransaction = {
|
|
16
|
-
type: TransactionType;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Data of referral rewards of a transaction
|
|
20
|
-
*
|
|
21
|
-
* @property {string} blockChain - The blockchain that reward is generated in, example: BSC
|
|
22
|
-
* @property {string | null} address - The smart contract address of rewarded asset, null for native assets
|
|
23
|
-
* @property {string} symbol - The symbol of the asset that is rewarded, example: ADA
|
|
24
|
-
* @property {number} decimals - The decimals of the rewarded asset, example: 18
|
|
25
|
-
* @property {string} amount - The machine-readable amount of the reward, example: 1000000000000000000
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export declare type TransactionStatusReferral = {
|
|
29
|
-
blockChain: string;
|
|
30
|
-
address: string | null;
|
|
31
|
-
symbol: string;
|
|
32
|
-
decimals: number;
|
|
33
|
-
amount: string;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Settings of user for swaps
|
|
37
|
-
*
|
|
38
|
-
* @property {string} slippage - Amount of users' preferred slippage in percent
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export declare type UserSettings = {
|
|
42
|
-
slippage: string;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* List of validations that Rango should do
|
|
46
|
-
*
|
|
47
|
-
* @property {boolean} balance - If true [Recommended], Rango will check that user has the required balance for swap
|
|
48
|
-
* @property {boolean} fee - If true [Recommended], Rango will check that user has the required fees in the wallet
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
export declare type CreateTransactionValidation = {
|
|
52
|
-
balance: boolean;
|
|
53
|
-
fee: boolean;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* A transaction's url that can be displayed to advanced user to track the progress
|
|
57
|
-
*
|
|
58
|
-
* @property {string} url - Url of the transaction in blockchain explorer. example: https://etherscan.io/tx/0xa1a3...
|
|
59
|
-
* @property {string | null} description - A custom display name to help user distinguish the transactions from each
|
|
60
|
-
* other. Example: Inbound, Outbound, Bridge, or null
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
export declare type SwapExplorerUrl = {
|
|
64
|
-
description: string | null;
|
|
65
|
-
url: string;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Request body of check tx status
|
|
69
|
-
*
|
|
70
|
-
* @property {string} requestId - The unique ID which is generated in the best route endpoint
|
|
71
|
-
* @property {number} step - 1-based step number of a complex multi-step swap, example: 1, 2, ...
|
|
72
|
-
* @property {number} txId - Tx hash that wallet returned, example: 0xa1a37ce2063c4764da27d990a22a0c89ed8ac585286a77a...
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
export declare type CheckTxStatusRequest = {
|
|
76
|
-
requestId: string;
|
|
77
|
-
step: number;
|
|
78
|
-
txId: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Request body of createTransaction endpoint
|
|
82
|
-
*
|
|
83
|
-
* @property {string} requestId - The unique ID which is generated in the best route endpoint
|
|
84
|
-
* @property {number} step - 1-based step number of a complex multi-step swap, example: 1, 2, ...
|
|
85
|
-
* @property {UserSettings} userSettings - user settings for the swap
|
|
86
|
-
* @property {CreateTransactionValidation} validations - the validation checks we are interested to check by Rango
|
|
87
|
-
* before starting the swap
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
export declare type CreateTransactionRequest = {
|
|
91
|
-
requestId: string;
|
|
92
|
-
step: number;
|
|
93
|
-
userSettings: UserSettings;
|
|
94
|
-
validations: CreateTransactionValidation;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Data of the event including its type and an extra metadata
|
|
98
|
-
* It should be used when an error happened in client and we want to inform server that transaction failed,
|
|
99
|
-
* E.g. user rejected the transaction dialog or and an RPC error raised during signing tx by user.
|
|
100
|
-
*
|
|
101
|
-
* @property {string} requestId - The requestId from best route endpoint
|
|
102
|
-
* @property {string} eventType - Type of the event that happened, example: TX_FAIL
|
|
103
|
-
* @property {[key: string]: string} data - A list of key-value for extra details
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
106
|
-
export declare type ReportTransactionRequest = {
|
|
107
|
-
requestId: string;
|
|
108
|
-
eventType: 'TX_FAIL';
|
|
109
|
-
data: {
|
|
110
|
-
[key: string]: string;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* The status of transaction in tracking
|
|
115
|
-
*/
|
|
116
|
-
export declare enum TransactionStatus {
|
|
117
|
-
FAILED = "failed",
|
|
118
|
-
RUNNING = "running",
|
|
119
|
-
SUCCESS = "success"
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* The swapper details for a transaction step
|
|
123
|
-
*/
|
|
124
|
-
export declare type SwapperStatusStep = {
|
|
125
|
-
name: string;
|
|
126
|
-
state: 'PENDING' | 'CREATED' | 'WAITING' | 'SIGNED' | 'SUCCESSED' | 'FAILED';
|
|
127
|
-
current: boolean;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Response of check transaction status containing the latest status of transaction
|
|
131
|
-
*
|
|
132
|
-
* @property {TransactionStatus | null} status - Status of the transaction, while the status is running or null, the
|
|
133
|
-
* client should retry until it turns into success or failed
|
|
134
|
-
* @property {number} timestamp - The timestamp of the executed transaction. Beware that timestamp can be null even if
|
|
135
|
-
* the status is successful or failed, example: 1635271424813
|
|
136
|
-
* @property {string | null} extraMessage - A message in case of failure, that could be shown to the user
|
|
137
|
-
* @property {string | null} outputAmount - The output amount of the transaction if it was successful, exmaple: 0.28
|
|
138
|
-
* @property {GenericTransaction | null} newTx - if a transaction needs more than one-step transaction to be signed by
|
|
139
|
-
* the user, the next step transaction will be returned in this field.
|
|
140
|
-
* @property {string | null} diagnosisUrl - In some special cases [e.g. AnySwap], the user should follow some steps
|
|
141
|
-
* outside Rango to get its assets back (refund). You can show this link to the user to help him
|
|
142
|
-
* @property {SwapExplorerUrl[] | null} explorerUrl - List of explorer URLs for the transactions that happened in this step.
|
|
143
|
-
* @property {TransactionStatusReferral[] | null} referrals - List of referral reward for the dApp and Rango
|
|
144
|
-
* @property {SwapperStatusStep[] | null} steps - Internal steps details of a route step, used for solana
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
export declare type TransactionStatusResponse = {
|
|
148
|
-
status: TransactionStatus | null;
|
|
149
|
-
timestamp: number | null;
|
|
150
|
-
extraMessage: string | null;
|
|
151
|
-
outputAmount: string | null;
|
|
152
|
-
newTx: GenericTransaction | null;
|
|
153
|
-
diagnosisUrl: string | null;
|
|
154
|
-
explorerUrl: SwapExplorerUrl[] | null;
|
|
155
|
-
referrals: TransactionStatusReferral[] | null;
|
|
156
|
-
steps: SwapperStatusStep[] | null;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* Response body of check-approval
|
|
160
|
-
*
|
|
161
|
-
* @property {boolean} isApproved - A flag which indicates that the approve tx is done or not
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
export declare type CheckApprovalResponse = {
|
|
165
|
-
isApproved: boolean;
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Response body of create transaction, to see a list of example transactions
|
|
169
|
-
* @see https://rango.exchange/apis/docs/tx-example
|
|
170
|
-
*
|
|
171
|
-
* @property {string | null} error - Error message about the incident if ok == false
|
|
172
|
-
* @property {boolean} ok - If true, Rango has created a non-null transaction and the error message is null
|
|
173
|
-
* @property {GenericTransaction | null} transaction - Transaction's raw data
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
export declare type CreateTransactionResponse = {
|
|
177
|
-
error: string | null;
|
|
178
|
-
ok: boolean;
|
|
179
|
-
transaction: GenericTransaction | null;
|
|
180
|
-
};
|
|
1
|
+
export * from 'rango-types/lib/api/main/transactions';
|
|
181
2
|
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/types/api/transactions.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAA"}
|
|
@@ -1,66 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GenericTransaction } from '../transactions';
|
|
3
|
-
/**
|
|
4
|
-
* CosmosCoin representing fee coins
|
|
5
|
-
*/
|
|
6
|
-
export declare type CosmosCoin = {
|
|
7
|
-
amount: string;
|
|
8
|
-
denom: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* CosmosStdFee representing fee for cosmos transaction
|
|
12
|
-
*/
|
|
13
|
-
export declare type CosmosStdFee = {
|
|
14
|
-
amount: CosmosCoin[];
|
|
15
|
-
gas: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Main transaction object for COSMOS type transactions (including Terra, Osmosis, ...)
|
|
19
|
-
*/
|
|
20
|
-
export declare type CosmosMessage = {
|
|
21
|
-
signType: 'AMINO' | 'DIRECT';
|
|
22
|
-
sequence: string | null;
|
|
23
|
-
source: number | null;
|
|
24
|
-
account_number: number | null;
|
|
25
|
-
rpcUrl: string | null;
|
|
26
|
-
chainId: string | null;
|
|
27
|
-
msgs: any[];
|
|
28
|
-
protoMsgs: any[];
|
|
29
|
-
memo: string | null;
|
|
30
|
-
fee: CosmosStdFee | null;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* An alternative to CosmosMessage object for the cosmos wallets that do not support generic Cosmos messages (e.g. XDefi)
|
|
34
|
-
*
|
|
35
|
-
* @property {AssetWithTicker} asset - The asset to be transferred
|
|
36
|
-
* @property {string} amount - The machine-readable amount to transfer, example: 1000000000000000000
|
|
37
|
-
* @property {number} decimals - The decimals for this asset, example: 18
|
|
38
|
-
* @property {string | null} memo - Memo of transaction, could be null
|
|
39
|
-
* @property {string} method - The transaction method, example: transfer, deposit
|
|
40
|
-
* @property {string} recipient - The recipient address of transaction
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
export declare type CosmosRawTransferData = {
|
|
44
|
-
amount: string;
|
|
45
|
-
asset: AssetWithTicker;
|
|
46
|
-
decimals: number;
|
|
47
|
-
memo: string | null;
|
|
48
|
-
method: string;
|
|
49
|
-
recipient: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* A Cosmos transaction, child of GenericTransaction
|
|
53
|
-
*
|
|
54
|
-
* @property {string} blockChain - The blockchain that this transaction will be executed in, same as the input blockchain of creating transaction
|
|
55
|
-
* @property {string} fromWalletAddress - Address of wallet that this transaction should be executed in, same as the create transaction request's input
|
|
56
|
-
* @property {CosmosMessage} data - Transaction data
|
|
57
|
-
* @property {CosmosRawTransferData} rawTransfer - An alternative to CosmosMessage object for the cosmos wallets that do not support generic Cosmos messages
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
export interface CosmosTransaction extends GenericTransaction {
|
|
61
|
-
blockChain: string;
|
|
62
|
-
fromWalletAddress: string;
|
|
63
|
-
data: CosmosMessage;
|
|
64
|
-
rawTransfer: CosmosRawTransferData;
|
|
65
|
-
}
|
|
1
|
+
export * from 'rango-types/lib/api/main/txs/cosmos';
|
|
66
2
|
//# sourceMappingURL=cosmos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"cosmos.d.ts","sourceRoot":"","sources":["../../../src/types/api/txs/cosmos.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA"}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* The transaction object for all EVM-based blockchains, including Ethereum, BSC, Polygon, Harmony, etc
|
|
4
|
-
*
|
|
5
|
-
* @property {boolean} isApprovalTx - Determines that this transaction is an approval transaction or not, if true user
|
|
6
|
-
* should approve the transaction and call create transaction endpoint again to get the original tx. Beware that most
|
|
7
|
-
* of the fields of this object will be passed directly to the wallet without any change.
|
|
8
|
-
* @property {string} blockChain - The blockchain that this transaction is going to run in
|
|
9
|
-
* @property {string | null} from - The source wallet address, it can be null
|
|
10
|
-
* @property {string} to - Address of destination wallet or the smart contract or token that is going to be called
|
|
11
|
-
* @property {string | null} data - The data of smart contract call, it can be null in case of native token transfer
|
|
12
|
-
* @property {string | null} value - The amount of transaction in case of native token transfer
|
|
13
|
-
* @property {string | null} nonce - The nonce value for transaction
|
|
14
|
-
* @property {string | null} gasPrice - The suggested gas price for this transaction
|
|
15
|
-
* @property {string | null} gasLimit - The suggested gas limit for this transaction
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export interface EvmTransaction extends GenericTransaction {
|
|
19
|
-
isApprovalTx: boolean;
|
|
20
|
-
blockChain: string;
|
|
21
|
-
from: string | null;
|
|
22
|
-
to: string;
|
|
23
|
-
data: string | null;
|
|
24
|
-
value: string | null;
|
|
25
|
-
nonce: string | null;
|
|
26
|
-
gasLimit: string | null;
|
|
27
|
-
gasPrice: string | null;
|
|
28
|
-
}
|
|
1
|
+
export * from 'rango-types/lib/api/main/txs/evm';
|
|
29
2
|
//# sourceMappingURL=evm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../src/types/api/txs/evm.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './evm';
|
|
2
|
-
export * from './cosmos';
|
|
3
|
-
export * from './transfer';
|
|
4
|
-
export * from './solana';
|
|
1
|
+
export * from './evm';
|
|
2
|
+
export * from './cosmos';
|
|
3
|
+
export * from './transfer';
|
|
4
|
+
export * from './solana';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/txs/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
|
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Account metadata used to define instructions
|
|
4
|
-
*/
|
|
5
|
-
export declare type SolanaInstructionKey = {
|
|
6
|
-
pubkey: string;
|
|
7
|
-
isSigner: boolean;
|
|
8
|
-
isWritable: boolean;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Transaction Instruction class
|
|
12
|
-
*/
|
|
13
|
-
export declare type SolanaInstruction = {
|
|
14
|
-
keys: SolanaInstructionKey[];
|
|
15
|
-
programId: string;
|
|
16
|
-
data: number[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Pair of signature and corresponding public key
|
|
20
|
-
*/
|
|
21
|
-
export declare type SolanaSignature = {
|
|
22
|
-
signature: number[];
|
|
23
|
-
publicKey: string;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* This type of transaction is used for all solana transactions
|
|
27
|
-
*
|
|
28
|
-
* @property {string} blockChain, equals to SOLANA
|
|
29
|
-
* @property {string} from, Source wallet address
|
|
30
|
-
* @property {string} identifier, Transaction hash used in case of retry
|
|
31
|
-
* @property {string | null} recentBlockhash, A recent blockhash
|
|
32
|
-
* @property {SolanaSignature[]} signatures, Signatures for the transaction
|
|
33
|
-
* @property {number[] | null} serializedMessage, The byte array of the transaction
|
|
34
|
-
* @property {SolanaInstruction[]} instructions, The instructions to atomically execute
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
export interface SolanaTransaction extends GenericTransaction {
|
|
38
|
-
blockChain: string;
|
|
39
|
-
from: string;
|
|
40
|
-
identifier: string;
|
|
41
|
-
recentBlockhash: string | null;
|
|
42
|
-
signatures: SolanaSignature[];
|
|
43
|
-
serializedMessage: number[] | null;
|
|
44
|
-
instructions: SolanaInstruction[];
|
|
45
|
-
}
|
|
1
|
+
export * from 'rango-types/lib/api/main/txs/solana';
|
|
46
2
|
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/types/api/txs/solana.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA"}
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GenericTransaction } from '../transactions';
|
|
3
|
-
/**
|
|
4
|
-
* TransferTransaction. This type of transaction is used for non-EVM and non-Cosmos blockchains including BTC, LTC, BCH
|
|
5
|
-
*
|
|
6
|
-
* @property {string} method - The method that should be passed to wallet. examples: deposit, transfer
|
|
7
|
-
* @property {AssetWithTicker} asset
|
|
8
|
-
* @property {string} amount - The machine-readable amount of transaction, example: 1000000000000000000
|
|
9
|
-
* @property {number} decimals - The decimals of the asset
|
|
10
|
-
* @property {string} fromWalletAddress - The source wallet address that can sign this transaction
|
|
11
|
-
* @property {string} recipientAddress - The destination wallet address that the fund should be sent to
|
|
12
|
-
* @property {string | null} memo - The memo of transaction, can be null
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export interface Transfer extends GenericTransaction {
|
|
16
|
-
method: string;
|
|
17
|
-
asset: AssetWithTicker;
|
|
18
|
-
amount: string;
|
|
19
|
-
decimals: number;
|
|
20
|
-
fromWalletAddress: string;
|
|
21
|
-
recipientAddress: string;
|
|
22
|
-
memo: string | null;
|
|
23
|
-
}
|
|
1
|
+
export * from 'rango-types/lib/api/main/txs/transfer';
|
|
24
2
|
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../src/types/api/txs/transfer.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAA"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './api/balance';
|
|
2
|
-
export * from './api/common';
|
|
3
|
-
export * from './api/meta';
|
|
4
|
-
export * from './api/routing';
|
|
5
|
-
export * from './api/transactions';
|
|
6
|
-
export * from './api/txs';
|
|
1
|
+
export * from './api/balance';
|
|
2
|
+
export * from './api/common';
|
|
3
|
+
export * from './api/meta';
|
|
4
|
+
export * from './api/routing';
|
|
5
|
+
export * from './api/transactions';
|
|
6
|
+
export * from './api/txs';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rango-sdk",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Rango Exchange SDK for dApps",
|
|
5
|
+
"module": "lib/rango-sdk.esm.js",
|
|
5
6
|
"main": "lib/index.js",
|
|
6
|
-
"types": "lib",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "git+https://github.com/rango-exchange/rango-sdk.git"
|
|
@@ -13,11 +14,13 @@
|
|
|
13
14
|
"url": "https://github.com/rango-exchange/rango-sdk/issues"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"build": "
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
17
|
+
"clean": "rm -rf ./lib",
|
|
18
|
+
"build": "tsdx build --tsconfig ./tsconfig.json && yarn post:build",
|
|
19
|
+
"post:build": "yarn mv:file lib && node ../../scripts/frank-build.js",
|
|
20
|
+
"watch": "tsdx watch",
|
|
21
|
+
"lint": "eslint src -c ../../.eslintrc.json --fix --ignore-path ../../.prettierignore",
|
|
22
|
+
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ../../.prettierrc.json --ignore-path ../../.prettierignore",
|
|
23
|
+
"mv:file": "sh ../../scripts/post-build.sh"
|
|
21
24
|
},
|
|
22
25
|
"keywords": [
|
|
23
26
|
"Rango Exchange",
|
|
@@ -30,25 +33,11 @@
|
|
|
30
33
|
],
|
|
31
34
|
"author": "rango.exchange",
|
|
32
35
|
"license": "GPL-3.0",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/jest": "^27.4.0",
|
|
35
|
-
"@types/uuid": "^8.3.4",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
37
|
-
"@typescript-eslint/parser": "^5.9.1",
|
|
38
|
-
"eslint": "^8.6.0",
|
|
39
|
-
"eslint-config-prettier": "^8.3.0",
|
|
40
|
-
"eslint-plugin-import": "^2.25.4",
|
|
41
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
42
|
-
"jest": "^27.4.7",
|
|
43
|
-
"prettier": "^2.5.1",
|
|
44
|
-
"semantic-release": "^19.0.2",
|
|
45
|
-
"ts-jest": "^27.1.3",
|
|
46
|
-
"typescript": "^4.5.4"
|
|
47
|
-
},
|
|
48
36
|
"dependencies": {
|
|
49
|
-
"axios": "^
|
|
50
|
-
"bignumber.js": "^9.
|
|
51
|
-
"
|
|
37
|
+
"axios": "^1.2.6",
|
|
38
|
+
"bignumber.js": "^9.1.1",
|
|
39
|
+
"rango-types": "^0.1.2",
|
|
40
|
+
"uuid": "^9.0.0"
|
|
52
41
|
},
|
|
53
42
|
"publishConfig": {
|
|
54
43
|
"access": "public",
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAwC;AAA/B,uGAAA,WAAW,OAAA;AACpB,0CAAuB"}
|