@triadxyz/triad-protocol 0.1.2-alpha.9 → 0.1.2-beta
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/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/stake.d.ts +135 -0
- package/dist/stake.js +483 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.js +107 -0
- package/dist/ticker.js +0 -6
- package/dist/types/idl_triad_protocol.json +1902 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +2 -0
- package/dist/types/stake.d.ts +130 -0
- package/dist/types/stake.js +20 -0
- package/dist/types/triad_protocol.d.ts +1527 -405
- package/dist/types/triad_protocol.js +0 -664
- package/dist/utils/constants.d.ts +31 -0
- package/dist/utils/constants.js +14 -1
- package/dist/utils/helpers.d.ts +19 -0
- package/dist/utils/helpers.js +88 -1
- package/dist/utils/stake-season-1/rarity.json +11036 -0
- package/dist/utils/stake-season-1/users-collections-week-1.json +3290 -0
- package/dist/vault.js +0 -4
- package/package.json +9 -8
package/dist/vault.js
CHANGED
|
@@ -54,7 +54,6 @@ class Vault {
|
|
|
54
54
|
try {
|
|
55
55
|
const UserPositionPDA = (0, helpers_1.getUserPositionAddressSync)(this.program.programId, this.provider.wallet.publicKey, tickerPDA);
|
|
56
56
|
const VaultPDA = (0, helpers_1.getVaultAddressSync)(this.program.programId, tickerPDA);
|
|
57
|
-
const VaultTokenAccountPDA = (0, helpers_1.getTokenVaultAddressSync)(this.program.programId, VaultPDA);
|
|
58
57
|
const userTokenAccount = yield (0, spl_token_1.getAssociatedTokenAddress)(mint, this.provider.wallet.publicKey);
|
|
59
58
|
let hasUserPosition = false;
|
|
60
59
|
try {
|
|
@@ -73,7 +72,6 @@ class Vault {
|
|
|
73
72
|
.createUserPosition()
|
|
74
73
|
.accounts({
|
|
75
74
|
signer: this.provider.wallet.publicKey,
|
|
76
|
-
userPosition: UserPositionPDA,
|
|
77
75
|
ticker: tickerPDA
|
|
78
76
|
})
|
|
79
77
|
.instruction());
|
|
@@ -87,7 +85,6 @@ class Vault {
|
|
|
87
85
|
userPosition: UserPositionPDA,
|
|
88
86
|
ticker: tickerPDA,
|
|
89
87
|
vault: VaultPDA,
|
|
90
|
-
vaultTokenAccount: VaultTokenAccountPDA,
|
|
91
88
|
userTokenAccount
|
|
92
89
|
})
|
|
93
90
|
.instruction());
|
|
@@ -149,7 +146,6 @@ class Vault {
|
|
|
149
146
|
.createUserPosition()
|
|
150
147
|
.accounts({
|
|
151
148
|
signer: this.provider.wallet.publicKey,
|
|
152
|
-
userPosition: UserPositionPDA,
|
|
153
149
|
ticker: tickerPDA
|
|
154
150
|
})
|
|
155
151
|
.instruction());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@triadxyz/triad-protocol",
|
|
3
|
-
"version": "0.1.2-
|
|
3
|
+
"version": "0.1.2-beta",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"clean": "rimraf dist",
|
|
9
9
|
"build": "yarn run clean && tsc",
|
|
10
10
|
"prepublishOnly": "yarn build",
|
|
11
|
-
"start": "yarn build && node ./dist/test.js"
|
|
11
|
+
"start": "yarn build && node ./dist/test.js",
|
|
12
|
+
"test": "rimraf dist && tsc && node ./dist/test.js"
|
|
12
13
|
},
|
|
13
14
|
"publishConfig": {
|
|
14
15
|
"access": "public"
|
|
@@ -24,18 +25,18 @@
|
|
|
24
25
|
"blockchain",
|
|
25
26
|
"protocol",
|
|
26
27
|
"triad",
|
|
27
|
-
"trading protocols"
|
|
28
|
+
"trading protocols",
|
|
29
|
+
"dex",
|
|
30
|
+
"SPL 404"
|
|
28
31
|
],
|
|
29
32
|
"author": "Triad Labs",
|
|
30
33
|
"license": "ISC",
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"@coral-xyz/anchor": "0.
|
|
33
|
-
"@
|
|
34
|
-
"@pythnetwork/client": "^2.19.0",
|
|
35
|
-
"@shadow-drive/sdk": "5.0.0",
|
|
36
|
-
"@solana/spl-token": "^0.3.11",
|
|
35
|
+
"@coral-xyz/anchor": "0.30.0",
|
|
36
|
+
"@solana/spl-token": "0.4.6",
|
|
37
37
|
"@solana/web3.js": "1.89.1",
|
|
38
38
|
"axios": "^1.5.1",
|
|
39
|
+
"bn.js": "^5.2.1",
|
|
39
40
|
"bs58": "5.0.0",
|
|
40
41
|
"uuid": "^9.0.1"
|
|
41
42
|
},
|