@thalalabs/surf 1.9.6 → 1.9.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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thalalabs/surf",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "TypeScript Interfaces & React Hooks for interacting with Aptos Smart Contracts with type safety.",
|
|
5
5
|
"main": "./build/cjs/index.js",
|
|
6
6
|
"module": "./build/esm/index.js",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@aptos-labs/ts-sdk": "^
|
|
47
|
-
"@aptos-labs/wallet-adapter-react": "^
|
|
46
|
+
"@aptos-labs/ts-sdk": "^5.1.1",
|
|
47
|
+
"@aptos-labs/wallet-adapter-react": "^7.1.2",
|
|
48
48
|
"@changesets/cli": "^2.26.1",
|
|
49
49
|
"@types/jest": "~29.5",
|
|
50
50
|
"@types/node": "~18",
|
|
51
51
|
"@types/react": "^18.2.8",
|
|
52
52
|
"@typescript-eslint/eslint-plugin": "~5.62",
|
|
53
|
-
"@initia/react-wallet-widget": "^1.
|
|
53
|
+
"@initia/react-wallet-widget": "^1.9.8",
|
|
54
54
|
"@typescript-eslint/parser": "~5.62",
|
|
55
55
|
"eslint": "~8.57",
|
|
56
56
|
"eslint-config-prettier": "~9.1",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"typescript": "~5.1"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@aptos-labs/ts-sdk": "^
|
|
71
|
-
"@aptos-labs/wallet-adapter-react": "^
|
|
70
|
+
"@aptos-labs/ts-sdk": "^5.1.1",
|
|
71
|
+
"@aptos-labs/wallet-adapter-react": "^7.1.2",
|
|
72
72
|
"react": "^18.2.0",
|
|
73
|
-
"@initia/react-wallet-widget": "^1.
|
|
73
|
+
"@initia/react-wallet-widget": "^1.9.8"
|
|
74
74
|
},
|
|
75
75
|
"peerDependenciesMeta": {
|
|
76
76
|
"@aptos-labs/wallet-adapter-react": {
|
|
@@ -19,29 +19,41 @@ describe('get account resource', () => {
|
|
|
19
19
|
// Teardown (cleanup) after assertions
|
|
20
20
|
afterAll(() => {});
|
|
21
21
|
|
|
22
|
-
it('get
|
|
23
|
-
const result = await client.useABI(COIN_ABI).resource.
|
|
22
|
+
it('get CoinInfo', async () => {
|
|
23
|
+
const result = await client.useABI(COIN_ABI).resource.CoinInfo({
|
|
24
24
|
typeArguments: ['0x1::aptos_coin::AptosCoin'],
|
|
25
25
|
account: '0x1',
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
expect(result
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
expect(result).toMatchInlineSnapshot(`
|
|
29
|
+
{
|
|
30
|
+
"decimals": 8,
|
|
31
|
+
"name": "Aptos Coin",
|
|
32
|
+
"supply": {
|
|
33
|
+
"vec": [
|
|
34
|
+
{
|
|
35
|
+
"aggregator": {
|
|
36
|
+
"vec": [
|
|
37
|
+
{
|
|
38
|
+
"handle": "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca",
|
|
39
|
+
"key": "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935",
|
|
40
|
+
"limit": "340282366920938463463374607431768211455",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
"integer": {
|
|
45
|
+
"vec": [],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
"symbol": "APT",
|
|
51
|
+
}
|
|
52
|
+
`);
|
|
41
53
|
}, 60000);
|
|
42
54
|
|
|
43
|
-
it('get
|
|
44
|
-
const result = await client.useABI(COIN_ABI).resource.
|
|
55
|
+
it('get CoinInfo with ledger version', async () => {
|
|
56
|
+
const result = await client.useABI(COIN_ABI).resource.CoinInfo({
|
|
45
57
|
typeArguments: ['0x1::aptos_coin::AptosCoin'],
|
|
46
58
|
account: '0x1',
|
|
47
59
|
ledgerVersion: '562606728',
|
|
@@ -49,28 +61,27 @@ describe('get account resource', () => {
|
|
|
49
61
|
|
|
50
62
|
expect(result).toMatchInlineSnapshot(`
|
|
51
63
|
{
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"addr": "0x1",
|
|
70
|
-
"creation_num": "13",
|
|
64
|
+
"decimals": 8,
|
|
65
|
+
"name": "Aptos Coin",
|
|
66
|
+
"supply": {
|
|
67
|
+
"vec": [
|
|
68
|
+
{
|
|
69
|
+
"aggregator": {
|
|
70
|
+
"vec": [
|
|
71
|
+
{
|
|
72
|
+
"handle": "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca",
|
|
73
|
+
"key": "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935",
|
|
74
|
+
"limit": "340282366920938463463374607431768211455",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
"integer": {
|
|
79
|
+
"vec": [],
|
|
80
|
+
},
|
|
71
81
|
},
|
|
72
|
-
|
|
82
|
+
],
|
|
73
83
|
},
|
|
84
|
+
"symbol": "APT",
|
|
74
85
|
}
|
|
75
86
|
`);
|
|
76
87
|
}, 60000);
|