@stellar/typescript-wallet-sdk 1.1.0-alpha.2 → 1.1.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/.husky/pre-commit +4 -0
- package/docs/WalletGuide.md +5 -0
- package/lib/bundle.js +15519 -18948
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +89069 -0
- package/lib/bundle_browser.js.map +1 -0
- package/lib/index.d.ts +26 -7
- package/lib/walletSdk/Anchor/Sep24.d.ts +48 -0
- package/lib/walletSdk/Anchor/index.d.ts +24 -0
- package/lib/walletSdk/Asset/index.d.ts +27 -0
- package/lib/walletSdk/Auth/WalletSigner.d.ts +7 -0
- package/lib/walletSdk/Auth/index.d.ts +21 -0
- package/lib/walletSdk/Exceptions/index.d.ts +56 -0
- package/lib/walletSdk/{horizon → Horizon}/Account.d.ts +3 -6
- package/lib/walletSdk/Horizon/AccountService.d.ts +53 -0
- package/lib/walletSdk/Horizon/Stellar.d.ts +16 -0
- package/lib/walletSdk/Horizon/Transaction/TransactionBuilder.d.ts +20 -0
- package/lib/walletSdk/Horizon/index.d.ts +4 -0
- package/lib/walletSdk/Recovery/index.d.ts +18 -0
- package/lib/walletSdk/{Watcher/Types.d.ts → Types/anchor.d.ts} +89 -6
- package/lib/walletSdk/Types/auth.d.ts +35 -0
- package/lib/walletSdk/Types/horizon.d.ts +34 -0
- package/lib/walletSdk/Types/index.d.ts +30 -0
- package/lib/walletSdk/Types/sep24.d.ts +30 -0
- package/lib/walletSdk/{toml/index.d.ts → Types/utils.d.ts} +4 -5
- package/lib/walletSdk/Types/watcher.d.ts +30 -0
- package/lib/walletSdk/{util → Utils}/camelToSnakeCase.d.ts +1 -1
- package/lib/walletSdk/Utils/getResultCode.d.ts +1 -0
- package/lib/walletSdk/Utils/index.d.ts +3 -0
- package/lib/walletSdk/Utils/toml.d.ts +3 -0
- package/lib/walletSdk/Utils/url.d.ts +1 -0
- package/lib/walletSdk/Watcher/index.d.ts +21 -42
- package/lib/walletSdk/index.d.ts +17 -15
- package/package.json +12 -2
- package/prettier.config.js +1 -0
- package/src/index.ts +39 -17
- package/src/walletSdk/Anchor/Sep24.ts +267 -0
- package/src/walletSdk/Anchor/index.ts +32 -201
- package/src/walletSdk/Asset/index.ts +58 -0
- package/src/walletSdk/Auth/WalletSigner.ts +23 -12
- package/src/walletSdk/Auth/index.ts +96 -49
- package/src/walletSdk/Exceptions/index.ts +148 -0
- package/src/walletSdk/{horizon → Horizon}/Account.ts +7 -9
- package/src/walletSdk/Horizon/AccountService.ts +96 -0
- package/src/walletSdk/Horizon/Stellar.ts +164 -0
- package/src/walletSdk/Horizon/Transaction/TransactionBuilder.ts +140 -0
- package/src/walletSdk/Horizon/index.ts +4 -0
- package/src/walletSdk/Recovery/index.ts +32 -0
- package/src/walletSdk/{Watcher/Types.ts → Types/anchor.ts} +114 -21
- package/src/walletSdk/Types/auth.ts +43 -0
- package/src/walletSdk/Types/horizon.ts +40 -0
- package/src/walletSdk/Types/index.ts +39 -0
- package/src/walletSdk/Types/sep24.ts +41 -0
- package/src/walletSdk/Types/utils.ts +77 -0
- package/src/walletSdk/Types/watcher.ts +34 -0
- package/src/walletSdk/Utils/camelToSnakeCase.ts +16 -0
- package/src/walletSdk/Utils/getResultCode.ts +5 -0
- package/src/walletSdk/Utils/index.ts +3 -0
- package/src/walletSdk/Utils/toml.ts +103 -0
- package/src/walletSdk/{util → Utils}/url.ts +1 -1
- package/src/walletSdk/Watcher/index.ts +137 -128
- package/src/walletSdk/index.ts +72 -55
- package/test/account.test.ts +19 -15
- package/test/accountService.test.ts +109 -0
- package/test/fixtures/TransactionsResponse.ts +144 -127
- package/test/stellar.test.ts +247 -0
- package/test/wallet.test.ts +196 -214
- package/tsconfig.json +3 -7
- package/webpack.config.js +7 -4
- package/lib/walletSdk/anchor/Types.d.ts +0 -75
- package/lib/walletSdk/anchor/index.d.ts +0 -87
- package/lib/walletSdk/auth/WalletSigner.d.ts +0 -6
- package/lib/walletSdk/auth/index.d.ts +0 -12
- package/lib/walletSdk/exception/index.d.ts +0 -21
- package/lib/walletSdk/horizon/AccountService.d.ts +0 -8
- package/lib/walletSdk/horizon/Stellar.d.ts +0 -7
- package/lib/walletSdk/horizon/constants.d.ts +0 -4
- package/lib/walletSdk/interactive/index.d.ts +0 -38
- package/lib/walletSdk/recovery/Recovery.d.ts +0 -3
- package/lib/walletSdk/util/sleep.d.ts +0 -1
- package/lib/walletSdk/util/url.d.ts +0 -1
- package/src/walletSdk/Anchor/Types.ts +0 -83
- package/src/walletSdk/exception/index.ts +0 -48
- package/src/walletSdk/horizon/AccountService.ts +0 -19
- package/src/walletSdk/horizon/Stellar.ts +0 -14
- package/src/walletSdk/horizon/constants.ts +0 -4
- package/src/walletSdk/interactive/index.ts +0 -105
- package/src/walletSdk/recovery/Recovery.ts +0 -6
- package/src/walletSdk/toml/index.ts +0 -179
- package/src/walletSdk/util/camelToSnakeCase.ts +0 -13
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { Horizon } from "stellar-sdk";
|
|
3
|
+
|
|
4
|
+
import { AccountService, SigningKeypair, Wallet } from "../src";
|
|
5
|
+
import { HORIZON_ORDER } from "../src/walletSdk/Types";
|
|
6
|
+
import { IssuedAssetId } from "../src/walletSdk/Asset";
|
|
7
|
+
|
|
8
|
+
let accountService: AccountService;
|
|
9
|
+
let accountAddress: string;
|
|
10
|
+
|
|
11
|
+
describe("Horizon", () => {
|
|
12
|
+
// Creates testing stellar account with USDC trustline
|
|
13
|
+
// in case it doesn't exist just yet
|
|
14
|
+
beforeAll(async () => {
|
|
15
|
+
const wallet = Wallet.TestNet();
|
|
16
|
+
const stellar = wallet.stellar();
|
|
17
|
+
accountService = stellar.account();
|
|
18
|
+
|
|
19
|
+
const fundingAccountKp = SigningKeypair.fromSecret(
|
|
20
|
+
"SDJTZXPFPWRK4GHECLQBDFRDCNEZFA4PIZA475WQEGKTL4Y2QLS77DGD",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// make sure funding account exists
|
|
24
|
+
try {
|
|
25
|
+
await stellar.server.loadAccount(fundingAccountKp.publicKey);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
await axios.get(
|
|
28
|
+
"https://friendbot.stellar.org/?addr=" + fundingAccountKp.publicKey,
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const testingAccountKp = SigningKeypair.fromSecret(
|
|
33
|
+
"SAXW2HC7JH5IJSIRFQ22JTMT6T3VONKGMYSIBLHNEJCV7AXLIGAXNESD",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// make sure testing account exists
|
|
37
|
+
accountAddress = testingAccountKp.publicKey;
|
|
38
|
+
try {
|
|
39
|
+
await stellar.server.loadAccount(accountAddress);
|
|
40
|
+
} catch (e) {
|
|
41
|
+
const txBuilder1 = await stellar.transaction({
|
|
42
|
+
sourceAddress: fundingAccountKp,
|
|
43
|
+
baseFee: 100,
|
|
44
|
+
});
|
|
45
|
+
const createAccTx = txBuilder1.createAccount(testingAccountKp, 2).build();
|
|
46
|
+
createAccTx.sign(fundingAccountKp.keypair);
|
|
47
|
+
|
|
48
|
+
let failed = false;
|
|
49
|
+
try {
|
|
50
|
+
await stellar.submitTransaction(createAccTx);
|
|
51
|
+
await stellar.server.loadAccount(accountAddress);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
failed = true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const txBuilder2 = await stellar.transaction({
|
|
57
|
+
sourceAddress: testingAccountKp,
|
|
58
|
+
baseFee: 100,
|
|
59
|
+
});
|
|
60
|
+
const asset = new IssuedAssetId(
|
|
61
|
+
"USDC",
|
|
62
|
+
"GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
|
|
63
|
+
);
|
|
64
|
+
const addUsdcTx = txBuilder2.addAssetSupport(asset).build();
|
|
65
|
+
addUsdcTx.sign(testingAccountKp.keypair);
|
|
66
|
+
|
|
67
|
+
// make sure testing account has USDC trustline
|
|
68
|
+
try {
|
|
69
|
+
await stellar.submitTransaction(addUsdcTx);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
failed = true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
expect(failed).toBeFalsy();
|
|
75
|
+
}
|
|
76
|
+
}, 30000);
|
|
77
|
+
|
|
78
|
+
it("should return stellar account details", async () => {
|
|
79
|
+
const response = await accountService.getInfo({ accountAddress });
|
|
80
|
+
|
|
81
|
+
expect(response.account_id).toBe(accountAddress);
|
|
82
|
+
expect(response.balances).toBeInstanceOf(Array);
|
|
83
|
+
expect(
|
|
84
|
+
response.balances.some(
|
|
85
|
+
(balance) =>
|
|
86
|
+
(balance as Horizon.BalanceLineAsset).asset_code === "USDC",
|
|
87
|
+
),
|
|
88
|
+
).toBeTruthy();
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("should return stellar account operations", async () => {
|
|
92
|
+
const response = await accountService.getHistory({
|
|
93
|
+
accountAddress,
|
|
94
|
+
order: HORIZON_ORDER.ASC,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(response.records).toBeInstanceOf(Array);
|
|
98
|
+
expect(response.records[0]).toBeInstanceOf(Object);
|
|
99
|
+
expect(response.records[0]).toHaveProperty("id");
|
|
100
|
+
expect(response.records[0]).toHaveProperty("type");
|
|
101
|
+
expect(response.records[0]).toHaveProperty("created_at");
|
|
102
|
+
expect(
|
|
103
|
+
response.records.some(({ type }) => type === "create_account"),
|
|
104
|
+
).toBeTruthy();
|
|
105
|
+
expect(
|
|
106
|
+
response.records.some(({ type }) => type === "change_trust"),
|
|
107
|
+
).toBeTruthy();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -1,150 +1,161 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
AnchorTransaction,
|
|
3
|
+
TransactionStatus,
|
|
4
|
+
} from "../../src/walletSdk/Types";
|
|
5
|
+
|
|
6
|
+
export const TransactionsResponse: AnchorTransaction[] = [
|
|
2
7
|
{
|
|
3
|
-
id:
|
|
4
|
-
kind:
|
|
5
|
-
status:
|
|
8
|
+
id: "db15d166-5a5e-4d5c-ba5d-271c32cd8cf0",
|
|
9
|
+
kind: "withdrawal",
|
|
10
|
+
status: TransactionStatus.pending_user_transfer_start,
|
|
6
11
|
status_eta: null,
|
|
7
|
-
amount_in:
|
|
8
|
-
amount_in_asset:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
amount_in: "50.55",
|
|
13
|
+
amount_in_asset:
|
|
14
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
15
|
+
amount_out: "75.08",
|
|
16
|
+
amount_out_asset: "iso4217:USD",
|
|
17
|
+
amount_fee: "1.00",
|
|
18
|
+
amount_fee_asset:
|
|
19
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
20
|
+
started_at: "2023-05-26T14:12:35.128156Z",
|
|
14
21
|
completed_at: null,
|
|
15
22
|
stellar_transaction_id: null,
|
|
16
23
|
external_transaction_id: null,
|
|
17
|
-
more_info_url:
|
|
18
|
-
|
|
19
|
-
message:
|
|
24
|
+
more_info_url:
|
|
25
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=db15d166-5a5e-4d5c-ba5d-271c32cd8cf0",
|
|
26
|
+
message: "waiting on the user to transfer funds",
|
|
20
27
|
to: null,
|
|
21
|
-
from:
|
|
22
|
-
withdraw_memo_type:
|
|
23
|
-
withdraw_memo:
|
|
24
|
-
withdraw_anchor_account:
|
|
28
|
+
from: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
29
|
+
withdraw_memo_type: "hash",
|
|
30
|
+
withdraw_memo: "AAAAAAAAAAAAAAAAAAAAANsV0WZaXk1cul0nHDLNjPA=",
|
|
31
|
+
withdraw_anchor_account:
|
|
32
|
+
"GCSGSR6KQQ5BP2FXVPWRL6SWPUSFWLVONLIBJZUKTVQB5FYJFVL6XOXE",
|
|
25
33
|
},
|
|
26
34
|
{
|
|
27
|
-
id:
|
|
28
|
-
kind:
|
|
29
|
-
status:
|
|
35
|
+
id: "hgt1576b-ac28-4c02-a521-ddbfd9ae7poi",
|
|
36
|
+
kind: "deposit",
|
|
37
|
+
status: TransactionStatus.pending_anchor,
|
|
30
38
|
status_eta: null,
|
|
31
|
-
amount_in:
|
|
32
|
-
amount_out:
|
|
33
|
-
amount_fee:
|
|
34
|
-
started_at:
|
|
39
|
+
amount_in: "120.45",
|
|
40
|
+
amount_out: "119.45",
|
|
41
|
+
amount_fee: "1.00",
|
|
42
|
+
started_at: "2023-05-26T10:11:27.227597Z",
|
|
35
43
|
completed_at: null,
|
|
36
44
|
stellar_transaction_id: null,
|
|
37
45
|
external_transaction_id: null,
|
|
38
|
-
more_info_url:
|
|
39
|
-
|
|
40
|
-
message:
|
|
46
|
+
more_info_url:
|
|
47
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=hgt1576b-ac28-4c02-a521-ddbfd9ae7poi",
|
|
48
|
+
message: "waiting for anchor to process the transaction",
|
|
41
49
|
claimable_balance_id: null,
|
|
42
|
-
to:
|
|
50
|
+
to: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
43
51
|
from: null,
|
|
44
|
-
deposit_memo_type:
|
|
45
|
-
deposit_memo: null
|
|
52
|
+
deposit_memo_type: "hash",
|
|
53
|
+
deposit_memo: null,
|
|
46
54
|
},
|
|
47
55
|
{
|
|
48
|
-
id:
|
|
49
|
-
kind:
|
|
50
|
-
status:
|
|
56
|
+
id: "ac71576b-ac28-4c02-a521-ddbfd9ae73cc",
|
|
57
|
+
kind: "deposit",
|
|
58
|
+
status: TransactionStatus.pending_trust,
|
|
51
59
|
status_eta: null,
|
|
52
|
-
amount_in:
|
|
53
|
-
amount_out:
|
|
54
|
-
amount_fee:
|
|
55
|
-
started_at:
|
|
60
|
+
amount_in: "123.45",
|
|
61
|
+
amount_out: "122.45",
|
|
62
|
+
amount_fee: "1.00",
|
|
63
|
+
started_at: "2023-05-26T14:11:27.227597Z",
|
|
56
64
|
completed_at: null,
|
|
57
65
|
stellar_transaction_id: null,
|
|
58
66
|
external_transaction_id: null,
|
|
59
|
-
more_info_url:
|
|
60
|
-
|
|
61
|
-
message:
|
|
67
|
+
more_info_url:
|
|
68
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=ac71576b-ac28-4c02-a521-ddbfd9ae73cc",
|
|
69
|
+
message: "waiting for a trustline to be established",
|
|
62
70
|
claimable_balance_id: null,
|
|
63
|
-
to:
|
|
71
|
+
to: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
64
72
|
from: null,
|
|
65
|
-
deposit_memo_type:
|
|
66
|
-
deposit_memo: null
|
|
73
|
+
deposit_memo_type: "hash",
|
|
74
|
+
deposit_memo: null,
|
|
67
75
|
},
|
|
68
76
|
{
|
|
69
|
-
id:
|
|
70
|
-
kind:
|
|
71
|
-
status:
|
|
77
|
+
id: "a20f35fc-f1b0-4657-b0b2-28f77d489df4",
|
|
78
|
+
kind: "deposit",
|
|
79
|
+
status: TransactionStatus.incomplete,
|
|
72
80
|
status_eta: null,
|
|
73
81
|
amount_in: null,
|
|
74
82
|
amount_out: null,
|
|
75
83
|
amount_fee: null,
|
|
76
|
-
started_at:
|
|
84
|
+
started_at: "2023-05-25T18:56:31.727086Z",
|
|
77
85
|
completed_at: null,
|
|
78
86
|
stellar_transaction_id: null,
|
|
79
87
|
external_transaction_id: null,
|
|
80
|
-
more_info_url:
|
|
81
|
-
|
|
82
|
-
message:
|
|
88
|
+
more_info_url:
|
|
89
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=a20f35fc-f1b0-4657-b0b2-28f77d489df4",
|
|
90
|
+
message: "incomplete",
|
|
83
91
|
claimable_balance_id: null,
|
|
84
|
-
to:
|
|
92
|
+
to: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
85
93
|
from: null,
|
|
86
|
-
deposit_memo_type:
|
|
87
|
-
deposit_memo: null
|
|
94
|
+
deposit_memo_type: "hash",
|
|
95
|
+
deposit_memo: null,
|
|
88
96
|
},
|
|
89
97
|
{
|
|
90
|
-
id:
|
|
91
|
-
kind:
|
|
92
|
-
status:
|
|
98
|
+
id: "325cf7c4-927d-4b7a-8a1f-d7188ebdde0f",
|
|
99
|
+
kind: "withdrawal",
|
|
100
|
+
status: TransactionStatus.incomplete,
|
|
93
101
|
status_eta: null,
|
|
94
102
|
amount_in: null,
|
|
95
103
|
amount_out: null,
|
|
96
104
|
amount_fee: null,
|
|
97
|
-
started_at:
|
|
105
|
+
started_at: "2023-05-25T18:56:29.615274Z",
|
|
98
106
|
completed_at: null,
|
|
99
107
|
stellar_transaction_id: null,
|
|
100
108
|
external_transaction_id: null,
|
|
101
|
-
more_info_url:
|
|
102
|
-
|
|
103
|
-
message:
|
|
109
|
+
more_info_url:
|
|
110
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=325cf7c4-927d-4b7a-8a1f-d7188ebdde0f",
|
|
111
|
+
message: "incomplete",
|
|
104
112
|
to: null,
|
|
105
|
-
from:
|
|
106
|
-
withdraw_memo_type:
|
|
113
|
+
from: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
114
|
+
withdraw_memo_type: "hash",
|
|
107
115
|
withdraw_memo: null,
|
|
108
|
-
withdraw_anchor_account: null
|
|
116
|
+
withdraw_anchor_account: null,
|
|
109
117
|
},
|
|
110
118
|
{
|
|
111
|
-
id:
|
|
112
|
-
kind:
|
|
113
|
-
status:
|
|
119
|
+
id: "hytcf7c4-927d-4b7a-8a1f-d7188ebddu8i",
|
|
120
|
+
kind: "withdrawal",
|
|
121
|
+
status: TransactionStatus.expired,
|
|
114
122
|
status_eta: null,
|
|
115
123
|
amount_in: null,
|
|
116
124
|
amount_out: null,
|
|
117
125
|
amount_fee: null,
|
|
118
|
-
started_at:
|
|
126
|
+
started_at: "2023-05-25T18:56:29.615274Z",
|
|
119
127
|
completed_at: null,
|
|
120
128
|
stellar_transaction_id: null,
|
|
121
129
|
external_transaction_id: null,
|
|
122
|
-
more_info_url:
|
|
123
|
-
|
|
124
|
-
message:
|
|
130
|
+
more_info_url:
|
|
131
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=hytcf7c4-927d-4b7a-8a1f-d7188ebddu8i",
|
|
132
|
+
message: "transaction has expired",
|
|
125
133
|
to: null,
|
|
126
|
-
from:
|
|
127
|
-
withdraw_memo_type:
|
|
134
|
+
from: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
135
|
+
withdraw_memo_type: "hash",
|
|
128
136
|
withdraw_memo: null,
|
|
129
|
-
withdraw_anchor_account: null
|
|
137
|
+
withdraw_anchor_account: null,
|
|
130
138
|
},
|
|
131
139
|
{
|
|
132
|
-
id:
|
|
133
|
-
kind:
|
|
134
|
-
status:
|
|
140
|
+
id: "def5d166-5a5e-4d5c-ba5d-271c32cd8abc",
|
|
141
|
+
kind: "withdrawal",
|
|
142
|
+
status: TransactionStatus.refunded,
|
|
135
143
|
status_eta: null,
|
|
136
|
-
amount_in:
|
|
137
|
-
amount_in_asset:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
amount_in: "95.35",
|
|
145
|
+
amount_in_asset:
|
|
146
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
147
|
+
amount_out: "144.48",
|
|
148
|
+
amount_out_asset: "iso4217:USD",
|
|
149
|
+
amount_fee: "1.00",
|
|
150
|
+
amount_fee_asset:
|
|
151
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
152
|
+
started_at: "2023-05-25T13:12:35.128156Z",
|
|
153
|
+
completed_at: "2023-05-26T15:12:35.128156Z",
|
|
154
|
+
stellar_transaction_id:
|
|
155
|
+
"abu0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9cdega",
|
|
145
156
|
external_transaction_id: null,
|
|
146
|
-
more_info_url:
|
|
147
|
-
|
|
157
|
+
more_info_url:
|
|
158
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=def5d166-5a5e-4d5c-ba5d-271c32cd8abc",
|
|
148
159
|
refunds: {
|
|
149
160
|
amount_refunded: "95.35",
|
|
150
161
|
amount_fee: "5",
|
|
@@ -156,7 +167,7 @@ export const TransactionsResponse = [
|
|
|
156
167
|
fee: "5",
|
|
157
168
|
},
|
|
158
169
|
{
|
|
159
|
-
id:"b9d0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9c9020",
|
|
170
|
+
id: "b9d0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9c9020",
|
|
160
171
|
id_type: "stellar",
|
|
161
172
|
amount: "55.35",
|
|
162
173
|
fee: "0",
|
|
@@ -165,34 +176,38 @@ export const TransactionsResponse = [
|
|
|
165
176
|
},
|
|
166
177
|
message: null,
|
|
167
178
|
to: null,
|
|
168
|
-
from:
|
|
169
|
-
withdraw_memo_type:
|
|
170
|
-
withdraw_memo:
|
|
171
|
-
withdraw_anchor_account:
|
|
179
|
+
from: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
180
|
+
withdraw_memo_type: "hash",
|
|
181
|
+
withdraw_memo: "AAAAAAAAAAAAAAAAAAAAANsV0WZaXk1cul0nHDLNjPA=",
|
|
182
|
+
withdraw_anchor_account:
|
|
183
|
+
"GCSGSR6KQQ5BP2FXVPWRL6SWPUSFWLVONLIBJZUKTVQB5FYJFVL6XOXE",
|
|
172
184
|
},
|
|
173
185
|
{
|
|
174
|
-
id:
|
|
175
|
-
kind:
|
|
176
|
-
status:
|
|
186
|
+
id: "duh5d166-5a5e-4d5c-ba5d-271c32cd8pok",
|
|
187
|
+
kind: "withdrawal",
|
|
188
|
+
status: TransactionStatus.completed,
|
|
177
189
|
status_eta: null,
|
|
178
|
-
amount_in:
|
|
179
|
-
amount_in_asset:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
amount_in: "95.35",
|
|
191
|
+
amount_in_asset:
|
|
192
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
193
|
+
amount_out: "144.48",
|
|
194
|
+
amount_out_asset: "iso4217:USD",
|
|
195
|
+
amount_fee: "1.00",
|
|
196
|
+
amount_fee_asset:
|
|
197
|
+
"stellar:SRT:GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B",
|
|
198
|
+
started_at: "2023-05-27T13:12:35.128156Z",
|
|
199
|
+
completed_at: "2023-05-28T15:12:35.128156Z",
|
|
200
|
+
stellar_transaction_id:
|
|
201
|
+
"hut0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9cdjiu",
|
|
187
202
|
external_transaction_id: null,
|
|
188
|
-
more_info_url:
|
|
189
|
-
|
|
203
|
+
more_info_url:
|
|
204
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=duh5d166-5a5e-4d5c-ba5d-271c32cd8pok",
|
|
190
205
|
refunds: {
|
|
191
206
|
amount_refunded: "35.35",
|
|
192
207
|
amount_fee: "0",
|
|
193
208
|
payments: [
|
|
194
209
|
{
|
|
195
|
-
id:"urh0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9cuhrt",
|
|
210
|
+
id: "urh0b2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9cuhrt",
|
|
196
211
|
id_type: "stellar",
|
|
197
212
|
amount: "35.35",
|
|
198
213
|
fee: "0",
|
|
@@ -201,30 +216,32 @@ export const TransactionsResponse = [
|
|
|
201
216
|
},
|
|
202
217
|
message: null,
|
|
203
218
|
to: null,
|
|
204
|
-
from:
|
|
205
|
-
withdraw_memo_type:
|
|
206
|
-
withdraw_memo:
|
|
207
|
-
withdraw_anchor_account:
|
|
219
|
+
from: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
220
|
+
withdraw_memo_type: "hash",
|
|
221
|
+
withdraw_memo: "AAAAAAAAAAAAAAAAAAAAANsV0WZaXk1cul0nHDLNjPA=",
|
|
222
|
+
withdraw_anchor_account:
|
|
223
|
+
"GCSGSR6KQQ5BP2FXVPWRL6SWPUSFWLVONLIBJZUKTVQB5FYJFVL6XOXE",
|
|
208
224
|
},
|
|
209
225
|
{
|
|
210
|
-
id:
|
|
211
|
-
kind:
|
|
212
|
-
status:
|
|
226
|
+
id: "uyt1576b-ac28-4c02-a521-ddbfd9ae7oiu",
|
|
227
|
+
kind: "deposit",
|
|
228
|
+
status: TransactionStatus.completed,
|
|
213
229
|
status_eta: null,
|
|
214
|
-
amount_in:
|
|
215
|
-
amount_out:
|
|
216
|
-
amount_fee:
|
|
217
|
-
started_at:
|
|
218
|
-
completed_at:
|
|
219
|
-
stellar_transaction_id:
|
|
230
|
+
amount_in: "150.45",
|
|
231
|
+
amount_out: "149.45",
|
|
232
|
+
amount_fee: "1.00",
|
|
233
|
+
started_at: "2023-05-22T12:11:27.227597Z",
|
|
234
|
+
completed_at: "2023-05-22T18:11:27.227597Z",
|
|
235
|
+
stellar_transaction_id:
|
|
236
|
+
"pokib2292c4e09e8eb22d036171491e87b8d2086bf8b265874c8d182cb9cbngt",
|
|
220
237
|
external_transaction_id: null,
|
|
221
|
-
more_info_url:
|
|
222
|
-
|
|
223
|
-
message:
|
|
238
|
+
more_info_url:
|
|
239
|
+
"https://testanchor.stellar.org/sep24/transaction/more_info?id=uyt1576b-ac28-4c02-a521-ddbfd9ae7oiu",
|
|
240
|
+
message: "deposit completed!",
|
|
224
241
|
claimable_balance_id: null,
|
|
225
|
-
to:
|
|
242
|
+
to: "GCZSYKPDWAKPGR7GYFBOIQB3TH352X7ELZL27WSJET5PDVFORDMGYTB5",
|
|
226
243
|
from: null,
|
|
227
|
-
deposit_memo_type:
|
|
228
|
-
deposit_memo: null
|
|
244
|
+
deposit_memo_type: "hash",
|
|
245
|
+
deposit_memo: null,
|
|
229
246
|
},
|
|
230
247
|
];
|