@pushchain/core 0.1.10 → 0.1.11
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/package.json
CHANGED
|
@@ -5,8 +5,13 @@ import { UniversalSigner } from '../universal/universal.types';
|
|
|
5
5
|
* Solana-compatible VM client for reading and writing SVM-based chains.
|
|
6
6
|
*/
|
|
7
7
|
export declare class SvmClient {
|
|
8
|
-
private readonly
|
|
8
|
+
private readonly connections;
|
|
9
|
+
private currentConnectionIndex;
|
|
9
10
|
constructor({ rpcUrls }: ClientOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Executes a function with automatic fallback to next RPC endpoint on failure
|
|
13
|
+
*/
|
|
14
|
+
private executeWithFallback;
|
|
10
15
|
/**
|
|
11
16
|
* Returns the balance (in lamports) of a Solana address.
|
|
12
17
|
*/
|
|
@@ -9,8 +9,44 @@ const anchor_1 = require("@coral-xyz/anchor");
|
|
|
9
9
|
*/
|
|
10
10
|
class SvmClient {
|
|
11
11
|
constructor({ rpcUrls }) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
this.currentConnectionIndex = 0;
|
|
13
|
+
if (!rpcUrls || rpcUrls.length === 0) {
|
|
14
|
+
throw new Error('At least one RPC URL must be provided');
|
|
15
|
+
}
|
|
16
|
+
this.connections = rpcUrls.map((url) => new web3_js_1.Connection(url, 'confirmed'));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Executes a function with automatic fallback to next RPC endpoint on failure
|
|
20
|
+
*/
|
|
21
|
+
executeWithFallback(operation_1) {
|
|
22
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (operation, operationName = 'operation') {
|
|
23
|
+
let lastError = null;
|
|
24
|
+
// Try each connection starting from current index
|
|
25
|
+
for (let attempt = 0; attempt < this.connections.length; attempt++) {
|
|
26
|
+
const connectionIndex = (this.currentConnectionIndex + attempt) % this.connections.length;
|
|
27
|
+
const connection = this.connections[connectionIndex];
|
|
28
|
+
try {
|
|
29
|
+
const result = yield operation(connection);
|
|
30
|
+
// Success - update current connection index if we switched
|
|
31
|
+
if (connectionIndex !== this.currentConnectionIndex) {
|
|
32
|
+
//console.log(`Switched to RPC endpoint ${connectionIndex + 1}: ${this.rpcUrls[connectionIndex]}`);
|
|
33
|
+
this.currentConnectionIndex = connectionIndex;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
lastError = error;
|
|
39
|
+
//console.warn(`RPC endpoint ${connectionIndex + 1} failed for ${operationName}:`, error);
|
|
40
|
+
// If this was our last attempt, throw the error
|
|
41
|
+
if (attempt === this.connections.length - 1) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
// Wait a bit before trying next endpoint
|
|
45
|
+
yield new Promise((resolve) => setTimeout(resolve, 100));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`All RPC endpoints failed for ${operationName}. Last error: ${lastError === null || lastError === void 0 ? void 0 : lastError.message}`);
|
|
49
|
+
});
|
|
14
50
|
}
|
|
15
51
|
/**
|
|
16
52
|
* Returns the balance (in lamports) of a Solana address.
|
|
@@ -18,7 +54,7 @@ class SvmClient {
|
|
|
18
54
|
getBalance(address) {
|
|
19
55
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
56
|
const pubkey = new web3_js_1.PublicKey(address);
|
|
21
|
-
const lamports = yield this.connection.getBalance(pubkey);
|
|
57
|
+
const lamports = yield this.executeWithFallback((connection) => connection.getBalance(pubkey), 'getBalance');
|
|
22
58
|
return BigInt(lamports);
|
|
23
59
|
});
|
|
24
60
|
}
|
|
@@ -28,15 +64,17 @@ class SvmClient {
|
|
|
28
64
|
*/
|
|
29
65
|
readContract(_a) {
|
|
30
66
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ abi, functionName, args = [], }) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
return this.executeWithFallback((connection) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const provider = new anchor_1.AnchorProvider(connection, new anchor_1.Wallet(new web3_js_1.Keypair()), { preflightCommitment: 'confirmed' });
|
|
69
|
+
// Anchor v0.31 constructor no longer takes programId
|
|
70
|
+
// Use the IDL's embedded metadata.address instead
|
|
71
|
+
const program = new anchor_1.Program(abi, provider);
|
|
72
|
+
const pubkey = new web3_js_1.PublicKey(args[0]);
|
|
73
|
+
// Cast account namespace to any to allow dynamic string
|
|
74
|
+
const accountNamespace = program.account;
|
|
75
|
+
const account = yield accountNamespace[functionName].fetch(pubkey);
|
|
76
|
+
return account;
|
|
77
|
+
}), 'readContract');
|
|
40
78
|
});
|
|
41
79
|
}
|
|
42
80
|
/**
|
|
@@ -44,30 +82,32 @@ class SvmClient {
|
|
|
44
82
|
*/
|
|
45
83
|
writeContract(_a) {
|
|
46
84
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ abi, signer, functionName, args = [], accounts = {}, extraSigners = [], }) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
85
|
+
return this.executeWithFallback((connection) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const provider = new anchor_1.AnchorProvider(connection, new anchor_1.Wallet(new web3_js_1.Keypair()), { preflightCommitment: 'confirmed' });
|
|
87
|
+
// NEW: Drop explicit programId. Anchor v0.31 infers it from IDL.metadata.address
|
|
88
|
+
const program = new anchor_1.Program(abi, provider);
|
|
89
|
+
// Convert BigInt arguments to BN instances for Anchor compatibility. Anchor program expects BN for BigInts
|
|
90
|
+
const convertedArgs = args.map((arg) => {
|
|
91
|
+
if (typeof arg === 'bigint') {
|
|
92
|
+
return new anchor_1.BN(arg.toString());
|
|
93
|
+
}
|
|
94
|
+
return arg;
|
|
95
|
+
});
|
|
96
|
+
// Build the method context
|
|
97
|
+
const methodContext = convertedArgs.length > 0
|
|
98
|
+
? program.methods[functionName](...convertedArgs)
|
|
99
|
+
: program.methods[functionName]();
|
|
100
|
+
let instructionBuilder = methodContext;
|
|
101
|
+
if (Object.keys(accounts).length > 0) {
|
|
102
|
+
instructionBuilder = instructionBuilder.accounts(accounts);
|
|
54
103
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (Object.keys(accounts).length > 0) {
|
|
63
|
-
instructionBuilder = instructionBuilder.accounts(accounts);
|
|
64
|
-
}
|
|
65
|
-
const instruction = yield instructionBuilder.instruction();
|
|
66
|
-
return this.sendTransaction({
|
|
67
|
-
instruction,
|
|
68
|
-
signer,
|
|
69
|
-
extraSigners,
|
|
70
|
-
});
|
|
104
|
+
const instruction = yield instructionBuilder.instruction();
|
|
105
|
+
return this.sendTransaction({
|
|
106
|
+
instruction,
|
|
107
|
+
signer,
|
|
108
|
+
extraSigners,
|
|
109
|
+
});
|
|
110
|
+
}), 'writeContract');
|
|
71
111
|
});
|
|
72
112
|
}
|
|
73
113
|
/**
|
|
@@ -75,22 +115,26 @@ class SvmClient {
|
|
|
75
115
|
*/
|
|
76
116
|
sendTransaction(_a) {
|
|
77
117
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ instruction, signer, extraSigners = [], }) {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
118
|
+
const executeTransaction = (conn) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const feePayerPubkey = new web3_js_1.PublicKey(signer.account.address);
|
|
120
|
+
const { blockhash, lastValidBlockHeight } = yield conn.getLatestBlockhash('finalized');
|
|
121
|
+
const tx = new web3_js_1.Transaction({
|
|
122
|
+
feePayer: feePayerPubkey,
|
|
123
|
+
blockhash,
|
|
124
|
+
lastValidBlockHeight,
|
|
125
|
+
}).add(instruction);
|
|
126
|
+
// Sign with all provided keypairs
|
|
127
|
+
if (extraSigners.length > 0) {
|
|
128
|
+
tx.partialSign(...extraSigners);
|
|
129
|
+
}
|
|
130
|
+
const messageBytes = tx.serializeMessage();
|
|
131
|
+
const signature = yield signer.signTransaction(messageBytes);
|
|
132
|
+
tx.addSignature(feePayerPubkey, Buffer.from(signature));
|
|
133
|
+
const rawTx = tx.serialize();
|
|
134
|
+
return yield conn.sendRawTransaction(rawTx);
|
|
135
|
+
});
|
|
136
|
+
// Otherwise use fallback mechanism
|
|
137
|
+
return this.executeWithFallback(executeTransaction, 'sendTransaction');
|
|
94
138
|
});
|
|
95
139
|
}
|
|
96
140
|
/**
|
|
@@ -99,20 +143,22 @@ class SvmClient {
|
|
|
99
143
|
confirmTransaction(signature_1) {
|
|
100
144
|
return tslib_1.__awaiter(this, arguments, void 0, function* (signature, timeout = 30000) {
|
|
101
145
|
const startTime = Date.now();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (status.value
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
status.value.confirmationStatus === '
|
|
110
|
-
|
|
146
|
+
return this.executeWithFallback((connection) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
while (Date.now() - startTime < timeout) {
|
|
148
|
+
const status = yield connection.getSignatureStatus(signature);
|
|
149
|
+
if (status === null || status === void 0 ? void 0 : status.value) {
|
|
150
|
+
if (status.value.err) {
|
|
151
|
+
throw new Error(`Transaction failed: ${JSON.stringify(status.value.err)}`);
|
|
152
|
+
}
|
|
153
|
+
if (status.value.confirmationStatus === 'confirmed' ||
|
|
154
|
+
status.value.confirmationStatus === 'finalized') {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
111
157
|
}
|
|
158
|
+
yield new Promise((r) => setTimeout(r, 500));
|
|
112
159
|
}
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
throw new Error(`Transaction confirmation timeout after ${timeout}ms`);
|
|
160
|
+
throw new Error(`Transaction confirmation timeout after ${timeout}ms`);
|
|
161
|
+
}), 'confirmTransaction');
|
|
116
162
|
});
|
|
117
163
|
}
|
|
118
164
|
/**
|
|
@@ -120,16 +166,18 @@ class SvmClient {
|
|
|
120
166
|
*/
|
|
121
167
|
estimateGas(_a) {
|
|
122
168
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ instructions, signer, }) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
169
|
+
return this.executeWithFallback((connection) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const feePayer = new web3_js_1.PublicKey(signer.account.address);
|
|
171
|
+
const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash();
|
|
172
|
+
const tx = new web3_js_1.Transaction({ blockhash, lastValidBlockHeight, feePayer });
|
|
173
|
+
if (instructions.length)
|
|
174
|
+
tx.add(...instructions);
|
|
175
|
+
const message = tx.compileMessage();
|
|
176
|
+
const feeResp = yield connection.getFeeForMessage(message);
|
|
177
|
+
if (!(feeResp === null || feeResp === void 0 ? void 0 : feeResp.value))
|
|
178
|
+
throw new Error('Failed to estimate fee');
|
|
179
|
+
return BigInt(feeResp.value);
|
|
180
|
+
}), 'estimateGas');
|
|
133
181
|
});
|
|
134
182
|
}
|
|
135
183
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svm-client.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/vm-client/svm-client.ts"],"names":[],"mappings":";;;;AAAA,6CAMyB;AAMzB,8CAAwE;AAGxE;;GAEG;AACH,MAAa,SAAS;
|
|
1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