rango-sdk 0.0.4 → 0.0.5
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/lib/types/api/transactions.d.ts +12 -1
- package/lib/types/api/transactions.d.ts.map +1 -1
- package/lib/types/api/transactions.js +1 -0
- package/lib/types/api/transactions.js.map +1 -1
- package/lib/types/api/txs/index.d.ts +1 -0
- package/lib/types/api/txs/index.d.ts.map +1 -1
- package/lib/types/api/txs/index.js +1 -0
- package/lib/types/api/txs/index.js.map +1 -1
- package/lib/types/api/txs/solana.d.ts +46 -0
- package/lib/types/api/txs/solana.d.ts.map +1 -0
- package/lib/types/api/txs/solana.js +3 -0
- package/lib/types/api/txs/solana.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
export declare enum TransactionType {
|
|
5
5
|
EVM = "EVM",
|
|
6
6
|
TRANSFER = "TRANSFER",
|
|
7
|
-
COSMOS = "COSMOS"
|
|
7
|
+
COSMOS = "COSMOS",
|
|
8
|
+
SOLANA = "SOLANA"
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Parent model for all types of transactions
|
|
@@ -117,6 +118,14 @@ export declare enum TransactionStatus {
|
|
|
117
118
|
RUNNING = "running",
|
|
118
119
|
SUCCESS = "success"
|
|
119
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
|
+
};
|
|
120
129
|
/**
|
|
121
130
|
* Response of check transaction status containing the latest status of transaction
|
|
122
131
|
*
|
|
@@ -132,6 +141,7 @@ export declare enum TransactionStatus {
|
|
|
132
141
|
* outside Rango to get its assets back (refund). You can show this link to the user to help him
|
|
133
142
|
* @property {SwapExplorerUrl[] | null} explorerUrl - List of explorer URLs for the transactions that happened in this step.
|
|
134
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
|
|
135
145
|
*
|
|
136
146
|
*/
|
|
137
147
|
export declare type TransactionStatusResponse = {
|
|
@@ -143,6 +153,7 @@ export declare type TransactionStatusResponse = {
|
|
|
143
153
|
diagnosisUrl: string | null;
|
|
144
154
|
explorerUrl: SwapExplorerUrl[] | null;
|
|
145
155
|
referrals: TransactionStatusReferral[] | null;
|
|
156
|
+
steps: SwapperStatusStep[] | null;
|
|
146
157
|
};
|
|
147
158
|
/**
|
|
148
159
|
* Response body of check-approval
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../src/types/api/transactions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,eAAe,CAAA;CACtB,CAAA;AAED;;;;;;;;;GASG;AACH,oBAAY,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;GAKG;AACH,oBAAY,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;GAMG;AACH,oBAAY,2BAA2B,GAAG;IACxC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;;;;;;GAOG;AACH,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;;;;GAOG;AACH,oBAAY,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;;;;;GASG;AACH,oBAAY,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,EAAE,2BAA2B,CAAA;CACzC,CAAA;AAED;;;;;;;;;GASG;AACH,oBAAY,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAChC,CAAA;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../src/types/api/transactions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,eAAe,CAAA;CACtB,CAAA;AAED;;;;;;;;;GASG;AACH,oBAAY,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;GAKG;AACH,oBAAY,YAAY,GAAG;IACzB,QAAQ,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I,CAAA;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,WAAW,EAAE,eAAe,EAAE,GAAG,IAAI,CAAA;IACrC,SAAS,EAAE,yBAAyB,EAAE,GAAG,IAAI,CAAA;IAC7C,KAAK,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAA;CAClC,CAAA;AAED;;;;;GAKG;AACH,oBAAY,qBAAqB,GAAG;IAClC,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,oBAAY,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,EAAE,EAAE,OAAO,CAAA;IACX,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACvC,CAAA"}
|
|
@@ -9,6 +9,7 @@ var TransactionType;
|
|
|
9
9
|
TransactionType["EVM"] = "EVM";
|
|
10
10
|
TransactionType["TRANSFER"] = "TRANSFER";
|
|
11
11
|
TransactionType["COSMOS"] = "COSMOS";
|
|
12
|
+
TransactionType["SOLANA"] = "SOLANA";
|
|
12
13
|
})(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
|
|
13
14
|
/**
|
|
14
15
|
* The status of transaction in tracking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/types/api/transactions.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/types/api/transactions.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AACnB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AA+GD;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;AACrB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"}
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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"}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./evm"), exports);
|
|
18
18
|
__exportStar(require("./cosmos"), exports);
|
|
19
19
|
__exportStar(require("./transfer"), exports);
|
|
20
|
+
__exportStar(require("./solana"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/api/txs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,2CAAwB;AACxB,6CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/api/txs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,2CAAwB;AACxB,6CAA0B;AAC1B,2CAAwB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { GenericTransaction } from '../transactions';
|
|
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
|
+
}
|
|
46
|
+
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../src/types/api/txs/solana.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf,CAAA;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAClC,YAAY,EAAE,iBAAiB,EAAE,CAAA;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../src/types/api/txs/solana.ts"],"names":[],"mappings":""}
|