@pythnetwork/pyth-solana-receiver 0.5.0 → 0.6.0
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/lib/PythSolanaReceiver.d.ts +4 -4
- package/lib/PythSolanaReceiver.d.ts.map +1 -1
- package/lib/PythSolanaReceiver.js +5 -4
- package/lib/compute_budget.d.ts +12 -0
- package/lib/compute_budget.d.ts.map +1 -1
- package/lib/compute_budget.js +13 -1
- package/lib/vaa.d.ts.map +1 -1
- package/lib/vaa.js +3 -0
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { Connection, Signer, Transaction, VersionedTransaction } from "@solana/w
|
|
|
4
4
|
import { PythSolanaReceiver as PythSolanaReceiverProgram } from "./idl/pyth_solana_receiver";
|
|
5
5
|
import { WormholeCoreBridgeSolana } from "./idl/wormhole_core_bridge_solana";
|
|
6
6
|
import { PublicKey } from "@solana/web3.js";
|
|
7
|
-
import { Wallet } from "@coral-xyz/anchor
|
|
7
|
+
import { Wallet } from "@coral-xyz/anchor";
|
|
8
8
|
import { TransactionBuilder, InstructionWithEphemeralSigners, PriorityFeeConfig } from "@pythnetwork/solana-utils";
|
|
9
9
|
import { PythPushOracle } from "./idl/pyth_push_oracle";
|
|
10
10
|
export type PriceUpdateAccount = IdlAccounts<PythSolanaReceiverProgram>["priceUpdateV2"];
|
|
@@ -275,14 +275,14 @@ export declare class PythSolanaReceiver {
|
|
|
275
275
|
/**
|
|
276
276
|
* Fetch the contents of a price feed account
|
|
277
277
|
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
|
|
278
|
-
* @param priceFeedId The price feed ID.
|
|
278
|
+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
|
|
279
279
|
* @returns The contents of the deserialized price feed account or `null` if the account doesn't exist
|
|
280
280
|
*/
|
|
281
|
-
fetchPriceFeedAccount(shardId: number, priceFeedId: Buffer): Promise<PriceUpdateAccount | null>;
|
|
281
|
+
fetchPriceFeedAccount(shardId: number, priceFeedId: Buffer | string): Promise<PriceUpdateAccount | null>;
|
|
282
282
|
/**
|
|
283
283
|
* Derive the address of a price feed account
|
|
284
284
|
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
|
|
285
|
-
* @param priceFeedId The price feed ID.
|
|
285
|
+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
|
|
286
286
|
* @returns The address of the price feed account
|
|
287
287
|
*/
|
|
288
288
|
getPriceFeedAccountAddress(shardId: number, priceFeedId: Buffer | string): PublicKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PythSolanaReceiver.d.ts","sourceRoot":"","sources":["../src/PythSolanaReceiver.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,UAAU,EACV,MAAM,EACN,WAAW,EACX,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAEhD,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wBAAwB,EAEzB,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EAAE,SAAS,EAAW,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"PythSolanaReceiver.d.ts","sourceRoot":"","sources":["../src/PythSolanaReceiver.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,UAAU,EACV,MAAM,EACN,WAAW,EACX,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAEhD,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wBAAwB,EAEzB,MAAM,mCA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,SAAS,GAC5B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAMrC;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAMrC;;;;;OAKG;IACH,0BAA0B,CACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,SAAS;CAOb"}
|
|
@@ -300,6 +300,7 @@ class PythSolanaReceiver {
|
|
|
300
300
|
})
|
|
301
301
|
.instruction(),
|
|
302
302
|
signers: [],
|
|
303
|
+
computeUnits: compute_budget_1.INIT_ENCODED_VAA_COMPUTE_BUDGET,
|
|
303
304
|
});
|
|
304
305
|
postInstructions.push(...(await (0, vaa_1.buildWriteEncodedVaaWithSplitInstructions)(this.wormhole, vaa, encodedVaaKeypair.publicKey)));
|
|
305
306
|
postInstructions.push({
|
|
@@ -400,7 +401,7 @@ class PythSolanaReceiver {
|
|
|
400
401
|
})
|
|
401
402
|
.instruction(),
|
|
402
403
|
signers: [],
|
|
403
|
-
computeUnits: compute_budget_1.
|
|
404
|
+
computeUnits: compute_budget_1.UPDATE_PRICE_FEED_COMPUTE_BUDGET,
|
|
404
405
|
});
|
|
405
406
|
priceFeedIdToPriceUpdateAccount["0x" + (0, price_service_sdk_1.parsePriceFeedMessage)(update.message).feedId.toString("hex")] = this.getPriceFeedAccountAddress(shardId, feedId);
|
|
406
407
|
}
|
|
@@ -448,7 +449,7 @@ class PythSolanaReceiver {
|
|
|
448
449
|
/**
|
|
449
450
|
* Fetch the contents of a price feed account
|
|
450
451
|
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
|
|
451
|
-
* @param priceFeedId The price feed ID.
|
|
452
|
+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
|
|
452
453
|
* @returns The contents of the deserialized price feed account or `null` if the account doesn't exist
|
|
453
454
|
*/
|
|
454
455
|
async fetchPriceFeedAccount(shardId, priceFeedId) {
|
|
@@ -457,7 +458,7 @@ class PythSolanaReceiver {
|
|
|
457
458
|
/**
|
|
458
459
|
* Derive the address of a price feed account
|
|
459
460
|
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
|
|
460
|
-
* @param priceFeedId The price feed ID.
|
|
461
|
+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
|
|
461
462
|
* @returns The address of the price feed account
|
|
462
463
|
*/
|
|
463
464
|
getPriceFeedAccountAddress(shardId, priceFeedId) {
|
|
@@ -468,7 +469,7 @@ exports.PythSolanaReceiver = PythSolanaReceiver;
|
|
|
468
469
|
/**
|
|
469
470
|
* Derive the address of a price feed account
|
|
470
471
|
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
|
|
471
|
-
* @param priceFeedId The price feed ID.
|
|
472
|
+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
|
|
472
473
|
* @param pushOracleProgramId The program ID of the Pyth Push Oracle program. If not provided, the default deployment will be used.
|
|
473
474
|
* @returns The address of the price feed account
|
|
474
475
|
*/
|
package/lib/compute_budget.d.ts
CHANGED
|
@@ -10,4 +10,16 @@ export declare const POST_UPDATE_ATOMIC_COMPUTE_BUDGET = 170000;
|
|
|
10
10
|
* A hard-coded budget for the compute units required for the `postUpdate` instruction in the Pyth Solana Receiver program.
|
|
11
11
|
*/
|
|
12
12
|
export declare const POST_UPDATE_COMPUTE_BUDGET = 35000;
|
|
13
|
+
/**
|
|
14
|
+
* A hard-coded budget for the compute units required for the `updatePriceFeed` instruction in the Pyth Push Oracle program.
|
|
15
|
+
*/
|
|
16
|
+
export declare const UPDATE_PRICE_FEED_COMPUTE_BUDGET = 190000;
|
|
17
|
+
/**
|
|
18
|
+
* A hard-coded budget for the compute units required for the `initEncodedVaa` instruction in the Wormhole program.
|
|
19
|
+
*/
|
|
20
|
+
export declare const INIT_ENCODED_VAA_COMPUTE_BUDGET = 3000;
|
|
21
|
+
/**
|
|
22
|
+
* A hard-coded budget for the compute units required for the `writeEncodedVaa` instruction in the Wormhole program.
|
|
23
|
+
*/
|
|
24
|
+
export declare const WRITE_ENCODED_VAA_COMPUTE_BUDGET = 3000;
|
|
13
25
|
//# sourceMappingURL=compute_budget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute_budget.d.ts","sourceRoot":"","sources":["../src/compute_budget.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD;;GAEG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"compute_budget.d.ts","sourceRoot":"","sources":["../src/compute_budget.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD;;GAEG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAChD;;GAEG;AACH,eAAO,MAAM,gCAAgC,SAAS,CAAC;AACvD;;GAEG;AACH,eAAO,MAAM,+BAA+B,OAAO,CAAC;AACpD;;GAEG;AACH,eAAO,MAAM,gCAAgC,OAAO,CAAC"}
|
package/lib/compute_budget.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POST_UPDATE_COMPUTE_BUDGET = exports.POST_UPDATE_ATOMIC_COMPUTE_BUDGET = exports.VERIFY_ENCODED_VAA_COMPUTE_BUDGET = void 0;
|
|
3
|
+
exports.WRITE_ENCODED_VAA_COMPUTE_BUDGET = exports.INIT_ENCODED_VAA_COMPUTE_BUDGET = exports.UPDATE_PRICE_FEED_COMPUTE_BUDGET = exports.POST_UPDATE_COMPUTE_BUDGET = exports.POST_UPDATE_ATOMIC_COMPUTE_BUDGET = exports.VERIFY_ENCODED_VAA_COMPUTE_BUDGET = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* A hard-coded budget for the compute units required for the `verifyEncodedVaa` instruction in the Wormhole program.
|
|
6
6
|
*/
|
|
@@ -13,3 +13,15 @@ exports.POST_UPDATE_ATOMIC_COMPUTE_BUDGET = 170000;
|
|
|
13
13
|
* A hard-coded budget for the compute units required for the `postUpdate` instruction in the Pyth Solana Receiver program.
|
|
14
14
|
*/
|
|
15
15
|
exports.POST_UPDATE_COMPUTE_BUDGET = 35000;
|
|
16
|
+
/**
|
|
17
|
+
* A hard-coded budget for the compute units required for the `updatePriceFeed` instruction in the Pyth Push Oracle program.
|
|
18
|
+
*/
|
|
19
|
+
exports.UPDATE_PRICE_FEED_COMPUTE_BUDGET = 190000;
|
|
20
|
+
/**
|
|
21
|
+
* A hard-coded budget for the compute units required for the `initEncodedVaa` instruction in the Wormhole program.
|
|
22
|
+
*/
|
|
23
|
+
exports.INIT_ENCODED_VAA_COMPUTE_BUDGET = 3000;
|
|
24
|
+
/**
|
|
25
|
+
* A hard-coded budget for the compute units required for the `writeEncodedVaa` instruction in the Wormhole program.
|
|
26
|
+
*/
|
|
27
|
+
exports.WRITE_ENCODED_VAA_COMPUTE_BUDGET = 3000;
|
package/lib/vaa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaa.d.ts","sourceRoot":"","sources":["../src/vaa.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"vaa.d.ts","sourceRoot":"","sources":["../src/vaa.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,UAE9C;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,CAAC,SAAoC,GACpC,MAAM,CAeR;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B;;;;GAIG;AACH,wBAAsB,gCAAgC,CACpD,QAAQ,EAAE,OAAO,CAAC,wBAAwB,CAAC,EAC3C,GAAG,EAAE,MAAM,EACX,iBAAiB,EAAE,OAAO,GACzB,OAAO,CAAC,+BAA+B,CAAC,CAS1C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC;;;;;;;GAOG;AACH,wBAAsB,yCAAyC,CAC7D,QAAQ,EAAE,OAAO,CAAC,wBAAwB,CAAC,EAC3C,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,GAClB,OAAO,CAAC,+BAA+B,EAAE,CAAC,CA6B5C"}
|
package/lib/vaa.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildWriteEncodedVaaWithSplitInstructions = exports.VAA_SPLIT_INDEX = exports.buildEncodedVaaCreateInstruction = exports.VAA_START = exports.trimSignatures = exports.VAA_SIGNATURE_SIZE = exports.DEFAULT_REDUCED_GUARDIAN_SET_SIZE = exports.getGuardianSetIndex = void 0;
|
|
4
|
+
const compute_budget_1 = require("./compute_budget");
|
|
4
5
|
/**
|
|
5
6
|
* Get the index of the guardian set that signed a VAA
|
|
6
7
|
*/
|
|
@@ -87,6 +88,7 @@ async function buildWriteEncodedVaaWithSplitInstructions(wormhole, vaa, draftVaa
|
|
|
87
88
|
})
|
|
88
89
|
.instruction(),
|
|
89
90
|
signers: [],
|
|
91
|
+
computeUnits: compute_budget_1.WRITE_ENCODED_VAA_COMPUTE_BUDGET,
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
94
|
instruction: await wormhole.methods
|
|
@@ -99,6 +101,7 @@ async function buildWriteEncodedVaaWithSplitInstructions(wormhole, vaa, draftVaa
|
|
|
99
101
|
})
|
|
100
102
|
.instruction(),
|
|
101
103
|
signers: [],
|
|
104
|
+
computeUnits: compute_budget_1.WRITE_ENCODED_VAA_COMPUTE_BUDGET,
|
|
102
105
|
},
|
|
103
106
|
];
|
|
104
107
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/pyth-solana-receiver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Pyth solana receiver SDK",
|
|
5
5
|
"homepage": "https://pyth.network",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"@pythnetwork/solana-utils": "*",
|
|
48
48
|
"@solana/web3.js": "^1.90.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "70c2c8ec4b5092729791f642493072565d953439"
|
|
51
51
|
}
|