@omegax/protocol-sdk 0.6.0 → 0.6.3
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/README.md +2 -2
- package/dist/internal/protocol/all.js +7 -0
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -211,8 +211,8 @@ npm run sdk:check
|
|
|
211
211
|
|
|
212
212
|
Latest fixture sync metadata:
|
|
213
213
|
|
|
214
|
-
- Source commit: `
|
|
215
|
-
- Fixture SHA-256: `
|
|
214
|
+
- Source commit: `eb6c94226f034233d0eb6990e7feddcf7bf80642`
|
|
215
|
+
- Fixture SHA-256: `1001bdd4a979f115a9589e1dd309676776aad90672a1aeae0ab63863a466cfb2`
|
|
216
216
|
|
|
217
217
|
## Development commands
|
|
218
218
|
|
|
@@ -5,9 +5,13 @@ import { encodeSubmitRewardClaimPayload, validateRewardClaimOptionalAccounts, }
|
|
|
5
5
|
import { asPubkey, deriveClaimPda, deriveCohortSettlementRootPda, deriveClaimDelegatePda, deriveConfigPda, deriveCoverageClaimPda, derivePolicySeriesPda, derivePolicySeriesPaymentOptionPda, derivePolicyPositionNftPda, derivePolicyPositionPda, deriveEnrollmentReplayPda, deriveAttestationVotePda, deriveCycleQuoteReplayPda, deriveInviteIssuerPda, deriveMemberCyclePda, deriveMembershipPda, deriveOracleStakePda, deriveOracleProfilePda, deriveOutcomeAggregatePda, deriveOraclePda, derivePoolAssetVaultPda, derivePoolAutomationPolicyPda, derivePoolCapitalClassPda, derivePoolCompliancePolicyPda, derivePoolControlAuthorityPda, derivePoolLiquidityConfigPda, derivePoolOraclePermissionSetPda, derivePoolOracleFeeVaultPda, derivePoolRiskConfigPda, derivePoolShareMintPda, derivePoolTermsPda, derivePoolOraclePolicyPda, derivePoolOraclePda, derivePoolPda, derivePoolRulePda, deriveProtocolFeeVaultPda, derivePremiumLedgerPda, derivePremiumReplayPda, derivePoolTreasuryReservePda, deriveRedemptionRequestPda, deriveSchemaPda, deriveSchemaDependencyPda, ZERO_PUBKEY, } from '../../protocol_seeds.js';
|
|
6
6
|
const MAX_POOL_ID_SEED_BYTES = 32;
|
|
7
7
|
const MAX_ORACLE_SUPPORTED_SCHEMAS = 16;
|
|
8
|
+
const BPF_UPGRADEABLE_LOADER_PROGRAM_ID = new PublicKey('BPFLoaderUpgradeab1e11111111111111111111111');
|
|
8
9
|
export const PROTOCOL_PROGRAM_ID = 'Bn6eixac1QEEVErGBvBjxAd6pgB9e2q4XHvAkinQ5y1B';
|
|
9
10
|
const IX_INITIALIZE_PROTOCOL = anchorDiscriminator('global', 'initialize_protocol');
|
|
10
11
|
const IX_CREATE_POOL = anchorDiscriminator('global', 'create_pool');
|
|
12
|
+
function deriveProgramDataPda(programId) {
|
|
13
|
+
return PublicKey.findProgramAddressSync([programId.toBuffer()], BPF_UPGRADEABLE_LOADER_PROGRAM_ID);
|
|
14
|
+
}
|
|
11
15
|
const IX_SET_POOL_STATUS = anchorDiscriminator('global', 'set_pool_status');
|
|
12
16
|
const IX_REGISTER_ORACLE = anchorDiscriminator('global', 'register_oracle');
|
|
13
17
|
const IX_CLAIM_ORACLE = anchorDiscriminator('global', 'claim_oracle');
|
|
@@ -3530,10 +3534,13 @@ export function createProtocolBuilders(connection, programId) {
|
|
|
3530
3534
|
buildInitializeProtocolTx(params) {
|
|
3531
3535
|
const admin = new PublicKey(params.admin);
|
|
3532
3536
|
const [configPda] = deriveConfigPda(programId);
|
|
3537
|
+
const [programDataPda] = deriveProgramDataPda(programId);
|
|
3533
3538
|
const instruction = new TransactionInstruction({
|
|
3534
3539
|
programId,
|
|
3535
3540
|
keys: [
|
|
3536
3541
|
{ pubkey: admin, isSigner: true, isWritable: true },
|
|
3542
|
+
{ pubkey: programId, isSigner: false, isWritable: false },
|
|
3543
|
+
{ pubkey: programDataPda, isSigner: false, isWritable: false },
|
|
3537
3544
|
{ pubkey: configPda, isSigner: false, isWritable: true },
|
|
3538
3545
|
{
|
|
3539
3546
|
pubkey: SystemProgram.programId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegax/protocol-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "TypeScript SDK for OmegaX protocol integrations on Solana devnet beta.",
|
|
5
5
|
"author": "OMEGAX HEALTH FZCO",
|
|
6
6
|
"contributors": [
|
|
@@ -100,14 +100,13 @@
|
|
|
100
100
|
"bn.js": "^5.2.3"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@eslint/js": "^
|
|
104
|
-
"@types/
|
|
105
|
-
"
|
|
106
|
-
"eslint": "^9.39.4",
|
|
103
|
+
"@eslint/js": "^10.0.1",
|
|
104
|
+
"@types/node": "^20.19.37",
|
|
105
|
+
"eslint": "^10.1.0",
|
|
107
106
|
"globals": "^17.4.0",
|
|
108
107
|
"prettier": "^3.8.1",
|
|
109
|
-
"tsx": "^4.
|
|
110
|
-
"typescript": "^5.
|
|
108
|
+
"tsx": "^4.21.0",
|
|
109
|
+
"typescript": "^5.9.3",
|
|
111
110
|
"typescript-eslint": "^8.57.1"
|
|
112
111
|
},
|
|
113
112
|
"engines": {
|