@primuslabs/fund-js-sdk 0.1.31 → 0.1.33
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.js +35 -0
- package/dist/index.mjs +35 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -116,6 +116,17 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
116
116
|
contractAddress: "0xD17512B7EC12880Bd94Eca9d774089fF89805F02",
|
|
117
117
|
redPacketContractAddress: "0x673D74d95A35B26804475066d9cD1DA3947f4eC3"
|
|
118
118
|
},
|
|
119
|
+
688689: {
|
|
120
|
+
chainId: 688689,
|
|
121
|
+
chainName: "Pharos Atlantic Testnet",
|
|
122
|
+
nativeCurrency: {
|
|
123
|
+
decimals: 18,
|
|
124
|
+
name: "PHRS",
|
|
125
|
+
symbol: "PHRS"
|
|
126
|
+
},
|
|
127
|
+
contractAddress: "0x3A83cAB6da93210933D94fC68A093a6983c2BCD1",
|
|
128
|
+
redPacketContractAddress: "0x7460ba14e2Ba151eaFD2983eB56F76578C79cb47"
|
|
129
|
+
},
|
|
119
130
|
84532: {
|
|
120
131
|
chainId: 84532,
|
|
121
132
|
chainName: "Base Sepolia",
|
|
@@ -137,8 +148,31 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
137
148
|
},
|
|
138
149
|
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
139
150
|
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
151
|
+
},
|
|
152
|
+
133: {
|
|
153
|
+
chainId: 133,
|
|
154
|
+
chainName: "HashKey Chain Testnet",
|
|
155
|
+
nativeCurrency: {
|
|
156
|
+
decimals: 18,
|
|
157
|
+
name: "HSK",
|
|
158
|
+
symbol: "HSK"
|
|
159
|
+
},
|
|
160
|
+
contractAddress: "0xd62A24eF37a62d613f53595B9700DFfdE372701D",
|
|
161
|
+
redPacketContractAddress: "0x018A793D8984d8ADcA5a7689273fFacBb131972E"
|
|
162
|
+
},
|
|
163
|
+
177: {
|
|
164
|
+
chainId: 177,
|
|
165
|
+
chainName: "HashKey Chain",
|
|
166
|
+
nativeCurrency: {
|
|
167
|
+
decimals: 18,
|
|
168
|
+
name: "HSK",
|
|
169
|
+
symbol: "HSK"
|
|
170
|
+
},
|
|
171
|
+
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
172
|
+
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
140
173
|
}
|
|
141
174
|
};
|
|
175
|
+
console.log("version:163");
|
|
142
176
|
var NATIVETOKENS = Object.values(SUPPORTEDCHAINIDSMAP).reduce((prev, curr) => {
|
|
143
177
|
return {
|
|
144
178
|
...prev,
|
|
@@ -202,6 +236,7 @@ var formatErrFn = (error) => {
|
|
|
202
236
|
const isNoPendingWithdrawals = hasErrorFlagFn(curErrorStrArr, ["no pending withdrawals"]);
|
|
203
237
|
if (isNoPendingWithdrawals) {
|
|
204
238
|
formatError = "no pending withdrawals";
|
|
239
|
+
return formatError;
|
|
205
240
|
}
|
|
206
241
|
const insufficientBalanceErrStrArr = ["insufficient", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
207
242
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|
package/dist/index.mjs
CHANGED
|
@@ -82,6 +82,17 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
82
82
|
contractAddress: "0xD17512B7EC12880Bd94Eca9d774089fF89805F02",
|
|
83
83
|
redPacketContractAddress: "0x673D74d95A35B26804475066d9cD1DA3947f4eC3"
|
|
84
84
|
},
|
|
85
|
+
688689: {
|
|
86
|
+
chainId: 688689,
|
|
87
|
+
chainName: "Pharos Atlantic Testnet",
|
|
88
|
+
nativeCurrency: {
|
|
89
|
+
decimals: 18,
|
|
90
|
+
name: "PHRS",
|
|
91
|
+
symbol: "PHRS"
|
|
92
|
+
},
|
|
93
|
+
contractAddress: "0x3A83cAB6da93210933D94fC68A093a6983c2BCD1",
|
|
94
|
+
redPacketContractAddress: "0x7460ba14e2Ba151eaFD2983eB56F76578C79cb47"
|
|
95
|
+
},
|
|
85
96
|
84532: {
|
|
86
97
|
chainId: 84532,
|
|
87
98
|
chainName: "Base Sepolia",
|
|
@@ -103,8 +114,31 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
103
114
|
},
|
|
104
115
|
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
105
116
|
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
117
|
+
},
|
|
118
|
+
133: {
|
|
119
|
+
chainId: 133,
|
|
120
|
+
chainName: "HashKey Chain Testnet",
|
|
121
|
+
nativeCurrency: {
|
|
122
|
+
decimals: 18,
|
|
123
|
+
name: "HSK",
|
|
124
|
+
symbol: "HSK"
|
|
125
|
+
},
|
|
126
|
+
contractAddress: "0xd62A24eF37a62d613f53595B9700DFfdE372701D",
|
|
127
|
+
redPacketContractAddress: "0x018A793D8984d8ADcA5a7689273fFacBb131972E"
|
|
128
|
+
},
|
|
129
|
+
177: {
|
|
130
|
+
chainId: 177,
|
|
131
|
+
chainName: "HashKey Chain",
|
|
132
|
+
nativeCurrency: {
|
|
133
|
+
decimals: 18,
|
|
134
|
+
name: "HSK",
|
|
135
|
+
symbol: "HSK"
|
|
136
|
+
},
|
|
137
|
+
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
138
|
+
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
106
139
|
}
|
|
107
140
|
};
|
|
141
|
+
console.log("version:163");
|
|
108
142
|
var NATIVETOKENS = Object.values(SUPPORTEDCHAINIDSMAP).reduce((prev, curr) => {
|
|
109
143
|
return {
|
|
110
144
|
...prev,
|
|
@@ -168,6 +202,7 @@ var formatErrFn = (error) => {
|
|
|
168
202
|
const isNoPendingWithdrawals = hasErrorFlagFn(curErrorStrArr, ["no pending withdrawals"]);
|
|
169
203
|
if (isNoPendingWithdrawals) {
|
|
170
204
|
formatError = "no pending withdrawals";
|
|
205
|
+
return formatError;
|
|
171
206
|
}
|
|
172
207
|
const insufficientBalanceErrStrArr = ["insufficient", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
173
208
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|