From 9d6ce88b41ddca04542b6283bcaa0181f3791428 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 09:56:20 +0100 Subject: [PATCH 01/31] moving non-generated files out of the generated folder --- clients/bolt-sdk/lib/index.d.ts | 2 +- clients/bolt-sdk/src/generated/instructions/apply.ts | 2 +- clients/bolt-sdk/src/generated/instructions/apply2.ts | 2 +- clients/bolt-sdk/src/generated/instructions/apply3.ts | 2 +- clients/bolt-sdk/src/generated/instructions/apply4.ts | 2 +- clients/bolt-sdk/src/generated/instructions/apply5.ts | 2 +- .../src/generated/instructions/initializeComponent.ts | 2 +- clients/bolt-sdk/src/{generated => }/index.ts | 8 ++++---- .../src/{generated => }/transactions/transactions.ts | 3 +-- 9 files changed, 12 insertions(+), 13 deletions(-) rename clients/bolt-sdk/src/{generated => }/index.ts (93%) rename clients/bolt-sdk/src/{generated => }/transactions/transactions.ts (99%) diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts index 67c2c73..128b9ee 100644 --- a/clients/bolt-sdk/lib/index.d.ts +++ b/clients/bolt-sdk/lib/index.d.ts @@ -3,7 +3,7 @@ import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; export * from "./accounts"; export * from "./instructions"; -export * from "./transactions/transactions"; +export * from "../transactions/transactions"; export * from "./delegation/accounts"; export * from "./delegation/delegate"; export declare const PROGRAM_ADDRESS = diff --git a/clients/bolt-sdk/src/generated/instructions/apply.ts b/clients/bolt-sdk/src/generated/instructions/apply.ts index b1528fe..d4ce554 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/instructions/apply2.ts b/clients/bolt-sdk/src/generated/instructions/apply2.ts index ab94334..858c916 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply2.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply2.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/instructions/apply3.ts b/clients/bolt-sdk/src/generated/instructions/apply3.ts index 75ec6de..e590715 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply3.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply3.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/instructions/apply4.ts b/clients/bolt-sdk/src/generated/instructions/apply4.ts index a086ad1..a4750e1 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply4.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply4.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/instructions/apply5.ts b/clients/bolt-sdk/src/generated/instructions/apply5.ts index 5bedf64..78bf957 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply5.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply5.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts b/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts index 47dcb1c..90b6a71 100644 --- a/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts +++ b/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts @@ -7,7 +7,7 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { FindComponentPda, SYSVAR_INSTRUCTIONS_PUBKEY } from "../index"; +import { FindComponentPda, SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions diff --git a/clients/bolt-sdk/src/generated/index.ts b/clients/bolt-sdk/src/index.ts similarity index 93% rename from clients/bolt-sdk/src/generated/index.ts rename to clients/bolt-sdk/src/index.ts index 0cc8b0e..db37d56 100644 --- a/clients/bolt-sdk/src/generated/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -1,10 +1,10 @@ import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; -export * from "./accounts"; -export * from "./instructions"; +export * from "./generated/accounts"; +export * from "./generated/instructions"; export * from "./transactions/transactions"; -export * from "./delegation/accounts"; -export * from "./delegation/delegate"; +export * from "./generated/delegation/accounts"; +export * from "./generated/delegation/delegate"; /** * Program address diff --git a/clients/bolt-sdk/src/generated/transactions/transactions.ts b/clients/bolt-sdk/src/transactions/transactions.ts similarity index 99% rename from clients/bolt-sdk/src/generated/transactions/transactions.ts rename to clients/bolt-sdk/src/transactions/transactions.ts index 9b7bf35..fa3f653 100644 --- a/clients/bolt-sdk/src/generated/transactions/transactions.ts +++ b/clients/bolt-sdk/src/transactions/transactions.ts @@ -126,13 +126,12 @@ export async function InitializeComponent({ interface ApplySystemInstruction { entity: PublicKey; components: PublicKey[]; + seeds?: string[]; system: PublicKey; authority: PublicKey; - seeds?: string[]; extraAccounts?: web3.AccountMeta[]; args?: object; } - export function createApplySystemInstruction({ entity, components, From 4c156a9447714f56c0e3930c69dfa151b1294278 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 10:24:20 +0100 Subject: [PATCH 02/31] move-non-generated-code --- clients/bolt-sdk/README.md | 2 +- clients/bolt-sdk/src/{generated => }/index.js | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename clients/bolt-sdk/src/{generated => }/index.js (100%) diff --git a/clients/bolt-sdk/README.md b/clients/bolt-sdk/README.md index 16c479a..43e2e11 100644 --- a/clients/bolt-sdk/README.md +++ b/clients/bolt-sdk/README.md @@ -12,7 +12,7 @@ npm install @magicblock-labs/bolt-sdk ## Contributing -The community is encouraged to contribute to the Soar SDK. +The community is encouraged to contribute to the BOLT SDK. Fixes and features are always welcome! Please feel free to submit a PR for review. diff --git a/clients/bolt-sdk/src/generated/index.js b/clients/bolt-sdk/src/index.js similarity index 100% rename from clients/bolt-sdk/src/generated/index.js rename to clients/bolt-sdk/src/index.js From 4e4aa90804cefa16f667eb2dc7c594c58452dee0 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 11:59:33 +0100 Subject: [PATCH 03/31] json-formatting --- package.json | 5 +++-- tsconfig.json | 26 ++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 13779ef..bf6df6f 100644 --- a/package.json +++ b/package.json @@ -28,5 +28,6 @@ "eslint-plugin-react": "^7.32.2", "prettier": "^2.6.2" }, - "license": "MIT" -} + "license": "MIT", + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 558b83e..5faac89 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,17 @@ { - "compilerOptions": { - "types": ["mocha", "chai"], - "typeRoots": ["./node_modules/@types"], - "lib": ["es2015"], - "module": "commonjs", - "target": "es6", - "esModuleInterop": true - } - } - \ No newline at end of file + "compilerOptions": { + "types": [ + "mocha", + "chai" + ], + "typeRoots": [ + "./node_modules/@types" + ], + "lib": [ + "es2015" + ], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} \ No newline at end of file From 4f2ff47cc39ea24aed4f9b940aeee160ef6f373b Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 12:21:17 +0100 Subject: [PATCH 04/31] using-original-generated-code --- clients/bolt-sdk/src/generated/index.ts | 20 +++++++++++++++++++ .../src/generated/instructions/addEntity.ts | 2 +- .../src/generated/instructions/apply.ts | 9 ++++----- .../src/generated/instructions/apply2.ts | 9 ++++----- .../src/generated/instructions/apply3.ts | 9 ++++----- .../src/generated/instructions/apply4.ts | 9 ++++----- .../src/generated/instructions/apply5.ts | 9 ++++----- .../instructions/initializeComponent.ts | 15 ++++++-------- 8 files changed, 47 insertions(+), 35 deletions(-) create mode 100644 clients/bolt-sdk/src/generated/index.ts diff --git a/clients/bolt-sdk/src/generated/index.ts b/clients/bolt-sdk/src/generated/index.ts new file mode 100644 index 0000000..3f9cbc4 --- /dev/null +++ b/clients/bolt-sdk/src/generated/index.ts @@ -0,0 +1,20 @@ +import { PublicKey } from "@solana/web3.js"; +export * from "./accounts"; +export * from "./errors"; +export * from "./instructions"; + +/** + * Program address + * + * @category constants + * @category generated + */ +export const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; + +/** + * Program public key + * + * @category constants + * @category generated + */ +export const PROGRAM_ID = new PublicKey(PROGRAM_ADDRESS); diff --git a/clients/bolt-sdk/src/generated/instructions/addEntity.ts b/clients/bolt-sdk/src/generated/instructions/addEntity.ts index a2a8a2c..e785b4a 100644 --- a/clients/bolt-sdk/src/generated/instructions/addEntity.ts +++ b/clients/bolt-sdk/src/generated/instructions/addEntity.ts @@ -66,7 +66,7 @@ export const addEntityInstructionDiscriminator = [ */ export function createAddEntityInstruction( accounts: AddEntityInstructionAccounts, - args: AddEntityInstructionArgs = { extraSeed: null }, + args: AddEntityInstructionArgs, programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n") ) { const [data] = addEntityStruct.serialize({ diff --git a/clients/bolt-sdk/src/generated/instructions/apply.ts b/clients/bolt-sdk/src/generated/instructions/apply.ts index d4ce554..1cfa7d8 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -49,8 +48,8 @@ export interface ApplyInstructionAccounts { componentProgram: web3.PublicKey; boltSystem: web3.PublicKey; boltComponent: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -94,12 +93,12 @@ export function createApplyInstruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, diff --git a/clients/bolt-sdk/src/generated/instructions/apply2.ts b/clients/bolt-sdk/src/generated/instructions/apply2.ts index 858c916..dc999dc 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply2.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply2.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -53,8 +52,8 @@ export interface Apply2InstructionAccounts { boltComponent1: web3.PublicKey; componentProgram2: web3.PublicKey; boltComponent2: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -108,12 +107,12 @@ export function createApply2Instruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, diff --git a/clients/bolt-sdk/src/generated/instructions/apply3.ts b/clients/bolt-sdk/src/generated/instructions/apply3.ts index e590715..fc2334c 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply3.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply3.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -57,8 +56,8 @@ export interface Apply3InstructionAccounts { boltComponent2: web3.PublicKey; componentProgram3: web3.PublicKey; boltComponent3: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -122,12 +121,12 @@ export function createApply3Instruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, diff --git a/clients/bolt-sdk/src/generated/instructions/apply4.ts b/clients/bolt-sdk/src/generated/instructions/apply4.ts index a4750e1..8c03c3c 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply4.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply4.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -61,8 +60,8 @@ export interface Apply4InstructionAccounts { boltComponent3: web3.PublicKey; componentProgram4: web3.PublicKey; boltComponent4: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -136,12 +135,12 @@ export function createApply4Instruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, diff --git a/clients/bolt-sdk/src/generated/instructions/apply5.ts b/clients/bolt-sdk/src/generated/instructions/apply5.ts index 78bf957..53b0ed3 100644 --- a/clients/bolt-sdk/src/generated/instructions/apply5.ts +++ b/clients/bolt-sdk/src/generated/instructions/apply5.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -65,8 +64,8 @@ export interface Apply5InstructionAccounts { boltComponent4: web3.PublicKey; componentProgram5: web3.PublicKey; boltComponent5: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -150,12 +149,12 @@ export function createApply5Instruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, diff --git a/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts b/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts index 90b6a71..7b1099a 100644 --- a/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts +++ b/clients/bolt-sdk/src/generated/instructions/initializeComponent.ts @@ -7,7 +7,6 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; -import { FindComponentPda, SYSVAR_INSTRUCTIONS_PUBKEY } from "../../index"; /** * @category Instructions @@ -35,11 +34,11 @@ export const initializeComponentStruct = new beet.BeetArgsStruct<{ */ export interface InitializeComponentInstructionAccounts { payer: web3.PublicKey; - data?: web3.PublicKey; + data: web3.PublicKey; entity: web3.PublicKey; componentProgram: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; systemProgram?: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; } @@ -70,9 +69,7 @@ export function createInitializeComponentInstruction( isSigner: true, }, { - pubkey: - accounts.data ?? - FindComponentPda(accounts.componentProgram, accounts.entity), + pubkey: accounts.data, isWritable: true, isSigner: false, }, @@ -87,12 +84,12 @@ export function createInitializeComponentInstruction( isSigner: false, }, { - pubkey: accounts.authority ?? programId, + pubkey: accounts.authority, isWritable: false, isSigner: false, }, { - pubkey: accounts.instructionSysvarAccount ?? SYSVAR_INSTRUCTIONS_PUBKEY, + pubkey: accounts.instructionSysvarAccount, isWritable: false, isSigner: false, }, From a1efd78a2ed94df25422bf503ccc3d6c3b838d7d Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 15:46:19 +0100 Subject: [PATCH 05/31] remove-double-declaration --- clients/bolt-sdk/src/index.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index db37d56..61c1608 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -1,31 +1,16 @@ import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; +import { PROGRAM_ID } from "generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; export * from "./transactions/transactions"; export * from "./generated/delegation/accounts"; export * from "./generated/delegation/delegate"; -/** - * Program address - * - * @category constants - * @category generated - */ -export const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; - export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey( "Sysvar1nstructions1111111111111111111111111" ); -/** - * Program public key - * - * @category constants - * @category generated - */ -export const PROGRAM_ID = new PublicKey(PROGRAM_ADDRESS); - export function FindWorldRegistryPda( programId: PublicKey = new PublicKey(PROGRAM_ID) ) { From a453b2eff20847d89d0e0324bdfa8ed1a1bca7ad Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 16:00:33 +0100 Subject: [PATCH 06/31] make-sure-instructions-parameters-are-passed-on-optionals --- clients/bolt-sdk/lib/index.d.ts | 2 +- .../bolt-sdk/src/transactions/transactions.ts | 21 ++++++++++++------- package.json | 3 +-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts index 128b9ee..67c2c73 100644 --- a/clients/bolt-sdk/lib/index.d.ts +++ b/clients/bolt-sdk/lib/index.d.ts @@ -3,7 +3,7 @@ import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; export * from "./accounts"; export * from "./instructions"; -export * from "../transactions/transactions"; +export * from "./transactions/transactions"; export * from "./delegation/accounts"; export * from "./delegation/delegate"; export declare const PROGRAM_ADDRESS = diff --git a/clients/bolt-sdk/src/transactions/transactions.ts b/clients/bolt-sdk/src/transactions/transactions.ts index fa3f653..1b40717 100644 --- a/clients/bolt-sdk/src/transactions/transactions.ts +++ b/clients/bolt-sdk/src/transactions/transactions.ts @@ -13,11 +13,13 @@ import { FindWorldRegistryPda, Registry, SerializeArgs, + SYSVAR_INSTRUCTIONS_PUBKEY, World, } from "../index"; import BN from "bn.js"; import type web3 from "@solana/web3.js"; import { type Connection, type PublicKey, Transaction } from "@solana/web3.js"; +import { PROGRAM_ID } from "generated"; const MAX_COMPONENTS = 5; @@ -70,11 +72,14 @@ export async function AddEntity({ const entityId = new BN(worldInstance.entities); const entityPda = FindEntityPda(new BN(worldInstance.id), entityId); - const createEntityIx = createAddEntityInstruction({ - world, - payer, - entity: entityPda, - }); + const createEntityIx = createAddEntityInstruction( + { + world, + payer, + entity: entityPda, + }, + { extraSeed: null } + ); return { transaction: new Transaction().add(createEntityIx), entityPda, @@ -113,7 +118,8 @@ export async function InitializeComponent({ entity, data: componentPda, componentProgram: componentId, - authority, + authority: authority ?? PROGRAM_ID, + instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts, }); @@ -165,8 +171,9 @@ export function createApplySystemInstruction({ } const instructionArgs = { - authority, + authority: authority ?? PROGRAM_ID, boltSystem: system, + instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts: extraAccounts, }; diff --git a/package.json b/package.json index bf6df6f..c0f21a7 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,5 @@ "eslint-plugin-react": "^7.32.2", "prettier": "^2.6.2" }, - "license": "MIT", - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "license": "MIT" } \ No newline at end of file From 80486f2b7a57c2c414e0bb27285d25159e634484 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 16:02:36 +0100 Subject: [PATCH 07/31] moving files out of generated folder --- clients/bolt-sdk/lib/index.d.ts | 4 ++-- .../bolt-sdk/src/{generated => }/delegation/accounts.ts | 0 .../bolt-sdk/src/{generated => }/delegation/delegate.ts | 0 .../bolt-sdk/src/{generated => }/delegation/undelegate.ts | 0 clients/bolt-sdk/src/generated/accounts/index.ts | 7 +++++++ clients/bolt-sdk/src/generated/index.ts | 7 +++++++ clients/bolt-sdk/src/generated/instructions/index.ts | 7 +++++++ clients/bolt-sdk/src/index.ts | 4 ++-- .../bolt-sdk/src/{transactions => world}/transactions.ts | 0 9 files changed, 25 insertions(+), 4 deletions(-) rename clients/bolt-sdk/src/{generated => }/delegation/accounts.ts (100%) rename clients/bolt-sdk/src/{generated => }/delegation/delegate.ts (100%) rename clients/bolt-sdk/src/{generated => }/delegation/undelegate.ts (100%) rename clients/bolt-sdk/src/{transactions => world}/transactions.ts (100%) diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts index 67c2c73..85d29f6 100644 --- a/clients/bolt-sdk/lib/index.d.ts +++ b/clients/bolt-sdk/lib/index.d.ts @@ -4,8 +4,8 @@ import BN from "bn.js"; export * from "./accounts"; export * from "./instructions"; export * from "./transactions/transactions"; -export * from "./delegation/accounts"; -export * from "./delegation/delegate"; +export * from "../delegation/accounts"; +export * from "../delegation/delegate"; export declare const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; export declare const SYSVAR_INSTRUCTIONS_PUBKEY: PublicKey; diff --git a/clients/bolt-sdk/src/generated/delegation/accounts.ts b/clients/bolt-sdk/src/delegation/accounts.ts similarity index 100% rename from clients/bolt-sdk/src/generated/delegation/accounts.ts rename to clients/bolt-sdk/src/delegation/accounts.ts diff --git a/clients/bolt-sdk/src/generated/delegation/delegate.ts b/clients/bolt-sdk/src/delegation/delegate.ts similarity index 100% rename from clients/bolt-sdk/src/generated/delegation/delegate.ts rename to clients/bolt-sdk/src/delegation/delegate.ts diff --git a/clients/bolt-sdk/src/generated/delegation/undelegate.ts b/clients/bolt-sdk/src/delegation/undelegate.ts similarity index 100% rename from clients/bolt-sdk/src/generated/delegation/undelegate.ts rename to clients/bolt-sdk/src/delegation/undelegate.ts diff --git a/clients/bolt-sdk/src/generated/accounts/index.ts b/clients/bolt-sdk/src/generated/accounts/index.ts index 67dd624..a616381 100644 --- a/clients/bolt-sdk/src/generated/accounts/index.ts +++ b/clients/bolt-sdk/src/generated/accounts/index.ts @@ -1,3 +1,10 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + import { Entity } from "./Entity"; import { Registry } from "./Registry"; import { World } from "./World"; diff --git a/clients/bolt-sdk/src/generated/index.ts b/clients/bolt-sdk/src/generated/index.ts index 3f9cbc4..7dbd9d2 100644 --- a/clients/bolt-sdk/src/generated/index.ts +++ b/clients/bolt-sdk/src/generated/index.ts @@ -1,3 +1,10 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + import { PublicKey } from "@solana/web3.js"; export * from "./accounts"; export * from "./errors"; diff --git a/clients/bolt-sdk/src/generated/instructions/index.ts b/clients/bolt-sdk/src/generated/instructions/index.ts index 9c68d81..abde1fd 100644 --- a/clients/bolt-sdk/src/generated/instructions/index.ts +++ b/clients/bolt-sdk/src/generated/instructions/index.ts @@ -1,3 +1,10 @@ +/** + * This code was GENERATED using the solita package. + * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. + * + * See: https://github.com/metaplex-foundation/solita + */ + export * from "./addEntity"; export * from "./apply"; export * from "./apply2"; diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 61c1608..3a61beb 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -4,8 +4,8 @@ import { PROGRAM_ID } from "generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; export * from "./transactions/transactions"; -export * from "./generated/delegation/accounts"; -export * from "./generated/delegation/delegate"; +export * from "./delegation/accounts"; +export * from "./delegation/delegate"; export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey( "Sysvar1nstructions1111111111111111111111111" diff --git a/clients/bolt-sdk/src/transactions/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts similarity index 100% rename from clients/bolt-sdk/src/transactions/transactions.ts rename to clients/bolt-sdk/src/world/transactions.ts From 51037eb4255ce9152f106c44e8f7a2decfc5d526 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 16:33:15 +0100 Subject: [PATCH 08/31] modified apply system function to take multiple entities --- clients/bolt-sdk/lib/index.d.ts | 4 +- clients/bolt-sdk/src/world/transactions.ts | 136 +++++++++++---------- 2 files changed, 72 insertions(+), 68 deletions(-) diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts index 85d29f6..67c2c73 100644 --- a/clients/bolt-sdk/lib/index.d.ts +++ b/clients/bolt-sdk/lib/index.d.ts @@ -4,8 +4,8 @@ import BN from "bn.js"; export * from "./accounts"; export * from "./instructions"; export * from "./transactions/transactions"; -export * from "../delegation/accounts"; -export * from "../delegation/delegate"; +export * from "./delegation/accounts"; +export * from "./delegation/delegate"; export declare const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; export declare const SYSVAR_INSTRUCTIONS_PUBKEY: PublicKey; diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 1b40717..856f88e 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -130,100 +130,119 @@ export async function InitializeComponent({ } interface ApplySystemInstruction { - entity: PublicKey; - components: PublicKey[]; - seeds?: string[]; - system: PublicKey; authority: PublicKey; + system: PublicKey; + entities: ApplySystemEntity[]; extraAccounts?: web3.AccountMeta[]; args?: object; } -export function createApplySystemInstruction({ - entity, - components, - system, - seeds, +function getApplyInstructionFunctionName(componentsCount: number) { + if (componentsCount === 1) return "createApplyInstruction"; + return `createApply${componentsCount}Instruction`; +} + +function getBoltComponentName(index: number, componentsCount: number) { + if (componentsCount === 1) return "boltComponent"; + return `boltComponent${index + 1}`; +} +function getBoltComponentProgramName(index: number, componentsCount: number) { + if (componentsCount === 1) return "componentProgram"; + return `componentProgram${index + 1}`; +} +function createApplySystemInstruction({ authority, + system, + entities, extraAccounts, args, }: ApplySystemInstruction): web3.TransactionInstruction { - const instructionFunctions = { - createApplyInstruction, - createApply2Instruction, - createApply3Instruction, - createApply4Instruction, - createApply5Instruction, - }; - if (components.length === 0) throw new Error("No components provided"); - if (seeds == null) seeds = new Array(components.length).fill(""); - if (seeds.length !== components.length) - throw new Error("Seed length does not match components length"); - const componentPdas: PublicKey[] = []; - - for (let i = 0; i < components.length; i++) { - const componentPda = FindComponentPda(components[i], entity, seeds[i]); - componentPdas.push(componentPda); + let componentCount = 0; + for (const entityIndex in entities) { + const entity = entities[entityIndex]; + componentCount += entity.components.length; + } + if (componentCount <= 0) { + throw new Error("No components provided"); } - if (components.length < 1 || components.length > MAX_COMPONENTS) { + if (componentCount > MAX_COMPONENTS) { throw new Error( `Not implemented for component counts outside 1-${MAX_COMPONENTS}` ); } const instructionArgs = { - authority: authority ?? PROGRAM_ID, + authority, boltSystem: system, instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts: extraAccounts, }; - components.forEach((component, index) => { - instructionArgs[getBoltComponentProgramName(index, components.length)] = - component; - instructionArgs[getBoltComponentName(index, components.length)] = - componentPdas[index]; - }); + for (const entityIndex in entities) { + const entity = entities[entityIndex]; + for (const componentIndex in entity.components) { + const component = entity.components[componentIndex]; + const componentPda = FindComponentPda( + component.programId, + entity.entity, + component.seed ?? "" + ); + instructionArgs[ + getBoltComponentProgramName(componentCount, componentCount) + ] = component.programId; + instructionArgs[getBoltComponentName(componentCount, componentCount)] = + componentPda; + componentCount++; + } + } - const functionName = getApplyInstructionFunctionName(components.length); + const instructionFunctions = { + createApplyInstruction, + createApply2Instruction, + createApply3Instruction, + createApply4Instruction, + createApply5Instruction, + }; + const functionName = getApplyInstructionFunctionName(componentCount); return instructionFunctions[functionName](instructionArgs, { args: SerializeArgs(args), }); } +interface ApplySystemEntity { + entity: PublicKey; + components: ApplySystemComponent[]; +} +interface ApplySystemComponent { + programId: PublicKey; + seed?: string; +} + /** - * Apply a system to an entity and its components + * Apply a system to a set of components * @param authority * @param system - * @param entity - * @param components - * @param args + * @param entities * @param extraAccounts - * @param seeds + * @param args * @constructor */ export async function ApplySystem({ authority, system, - entity, - components, - args = {}, + entities, extraAccounts, - seeds, + args = {}, }: { authority: PublicKey; system: PublicKey; - entity: PublicKey; - components: PublicKey[]; - args?: object; + entities: ApplySystemEntity[]; extraAccounts?: web3.AccountMeta[]; - seeds?: string[]; + args?: object; }): Promise<{ transaction: Transaction }> { const applySystemIx = createApplySystemInstruction({ - entity, - components, - system, authority, - seeds, + system, + entities, extraAccounts, args, }); @@ -231,18 +250,3 @@ export async function ApplySystem({ transaction: new Transaction().add(applySystemIx), }; } - -function getApplyInstructionFunctionName(componentsLength: number) { - if (componentsLength === 1) return "createApplyInstruction"; - return `createApply${componentsLength}Instruction`; -} - -function getBoltComponentName(index: number, componentsLength: number) { - if (componentsLength === 1) return "boltComponent"; - return `boltComponent${index + 1}`; -} - -function getBoltComponentProgramName(index: number, componentsLength: number) { - if (componentsLength === 1) return "componentProgram"; - return `componentProgram${index + 1}`; -} From 0003b4a65372b0b61cccacc8ea07d265a8911b74 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 16:51:18 +0100 Subject: [PATCH 09/31] component-id-param-name --- clients/bolt-sdk/src/world/transactions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 856f88e..22c907d 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -182,13 +182,13 @@ function createApplySystemInstruction({ for (const componentIndex in entity.components) { const component = entity.components[componentIndex]; const componentPda = FindComponentPda( - component.programId, + component.id, entity.entity, component.seed ?? "" ); instructionArgs[ getBoltComponentProgramName(componentCount, componentCount) - ] = component.programId; + ] = component.id; instructionArgs[getBoltComponentName(componentCount, componentCount)] = componentPda; componentCount++; @@ -213,7 +213,7 @@ interface ApplySystemEntity { components: ApplySystemComponent[]; } interface ApplySystemComponent { - programId: PublicKey; + id: PublicKey; seed?: string; } From d18435b74450488bba9c23b3aeeb59bd954f049a Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 17:09:34 +0100 Subject: [PATCH 10/31] nit-naming --- clients/bolt-sdk/src/world/transactions.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 22c907d..bcafa75 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -131,7 +131,7 @@ export async function InitializeComponent({ interface ApplySystemInstruction { authority: PublicKey; - system: PublicKey; + systemId: PublicKey; entities: ApplySystemEntity[]; extraAccounts?: web3.AccountMeta[]; args?: object; @@ -151,7 +151,7 @@ function getBoltComponentProgramName(index: number, componentsCount: number) { } function createApplySystemInstruction({ authority, - system, + systemId, entities, extraAccounts, args, @@ -172,7 +172,7 @@ function createApplySystemInstruction({ const instructionArgs = { authority, - boltSystem: system, + boltSystem: systemId, instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts: extraAccounts, }; @@ -220,7 +220,7 @@ interface ApplySystemComponent { /** * Apply a system to a set of components * @param authority - * @param system + * @param systemId * @param entities * @param extraAccounts * @param args @@ -228,20 +228,20 @@ interface ApplySystemComponent { */ export async function ApplySystem({ authority, - system, + systemId, entities, extraAccounts, args = {}, }: { authority: PublicKey; - system: PublicKey; + systemId: PublicKey; entities: ApplySystemEntity[]; extraAccounts?: web3.AccountMeta[]; args?: object; }): Promise<{ transaction: Transaction }> { const applySystemIx = createApplySystemInstruction({ authority, - system, + systemId, entities, extraAccounts, args, From 86a35023d6bdfac2dbb91cb2a4ca88333fe02cf6 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 18:19:57 +0100 Subject: [PATCH 11/31] removing lib from git and continue on fixing integration tests --- .github/workflows/run-tests.yml | 15 +- Anchor.toml | 1 + clients/bolt-sdk/lib/accounts/Entity.d.ts | 48 --- clients/bolt-sdk/lib/accounts/Entity.d.ts.map | 1 - clients/bolt-sdk/lib/accounts/Entity.js | 308 ---------------- clients/bolt-sdk/lib/accounts/Entity.js.map | 1 - clients/bolt-sdk/lib/accounts/Registry.d.ts | 48 --- .../bolt-sdk/lib/accounts/Registry.d.ts.map | 1 - clients/bolt-sdk/lib/accounts/Registry.js | 314 ---------------- clients/bolt-sdk/lib/accounts/Registry.js.map | 1 - clients/bolt-sdk/lib/accounts/World.d.ts | 56 --- clients/bolt-sdk/lib/accounts/World.d.ts.map | 1 - clients/bolt-sdk/lib/accounts/World.js | 321 ---------------- clients/bolt-sdk/lib/accounts/World.js.map | 1 - clients/bolt-sdk/lib/accounts/index.d.ts.map | 1 - clients/bolt-sdk/lib/accounts/index.js | 45 --- clients/bolt-sdk/lib/accounts/index.js.map | 1 - clients/bolt-sdk/lib/delegation/accounts.d.ts | 21 +- .../bolt-sdk/lib/delegation/accounts.d.ts.map | 2 +- clients/bolt-sdk/lib/delegation/accounts.js | 51 +-- .../bolt-sdk/lib/delegation/accounts.js.map | 2 +- clients/bolt-sdk/lib/delegation/delegate.d.ts | 37 +- .../bolt-sdk/lib/delegation/delegate.d.ts.map | 2 +- clients/bolt-sdk/lib/delegation/delegate.js | 232 +++++------- .../bolt-sdk/lib/delegation/delegate.js.map | 2 +- .../bolt-sdk/lib/delegation/undelegate.d.ts | 29 +- .../lib/delegation/undelegate.d.ts.map | 2 +- clients/bolt-sdk/lib/delegation/undelegate.js | 223 +++++------ .../bolt-sdk/lib/delegation/undelegate.js.map | 2 +- clients/bolt-sdk/lib/errors/index.d.ts.map | 1 - clients/bolt-sdk/lib/errors/index.js | 70 ---- clients/bolt-sdk/lib/errors/index.js.map | 1 - .../lib/generated/accounts/Entity.d.ts | 33 ++ .../lib/generated/accounts/Entity.d.ts.map | 1 + .../bolt-sdk/lib/generated/accounts/Entity.js | 158 ++++++++ .../lib/generated/accounts/Entity.js.map | 1 + .../lib/generated/accounts/Registry.d.ts | 33 ++ .../lib/generated/accounts/Registry.d.ts.map | 1 + .../lib/generated/accounts/Registry.js | 158 ++++++++ .../lib/generated/accounts/Registry.js.map | 1 + .../lib/generated/accounts/World.d.ts | 39 ++ .../lib/generated/accounts/World.d.ts.map | 1 + .../bolt-sdk/lib/generated/accounts/World.js | 172 +++++++++ .../lib/generated/accounts/World.js.map | 1 + .../lib/{ => generated}/accounts/index.d.ts | 8 +- .../lib/generated/accounts/index.d.ts.map | 1 + .../bolt-sdk/lib/generated/accounts/index.js | 25 ++ .../lib/generated/accounts/index.js.map | 1 + .../lib/{ => generated}/errors/index.d.ts | 10 +- .../lib/generated/errors/index.d.ts.map | 1 + .../bolt-sdk/lib/generated/errors/index.js | 47 +++ .../lib/generated/errors/index.js.map | 1 + clients/bolt-sdk/lib/generated/index.d.ts | 7 + clients/bolt-sdk/lib/generated/index.d.ts.map | 1 + clients/bolt-sdk/lib/generated/index.js | 24 ++ clients/bolt-sdk/lib/generated/index.js.map | 1 + .../lib/generated/instructions/addEntity.d.ts | 18 + .../generated/instructions/addEntity.d.ts.map | 1 + .../lib/generated/instructions/addEntity.js | 87 +++++ .../generated/instructions/addEntity.js.map | 1 + .../lib/generated/instructions/apply.d.ts | 19 + .../lib/generated/instructions/apply.d.ts.map | 1 + .../lib/generated/instructions/apply.js | 91 +++++ .../lib/generated/instructions/apply.js.map | 1 + .../lib/generated/instructions/apply2.d.ts | 21 ++ .../generated/instructions/apply2.d.ts.map | 1 + .../lib/generated/instructions/apply2.js | 101 +++++ .../lib/generated/instructions/apply2.js.map | 1 + .../lib/generated/instructions/apply3.d.ts | 23 ++ .../generated/instructions/apply3.d.ts.map | 1 + .../lib/generated/instructions/apply3.js | 111 ++++++ .../lib/generated/instructions/apply3.js.map | 1 + .../lib/generated/instructions/apply4.d.ts | 25 ++ .../generated/instructions/apply4.d.ts.map | 1 + .../lib/generated/instructions/apply4.js | 121 ++++++ .../lib/generated/instructions/apply4.js.map | 1 + .../lib/generated/instructions/apply5.d.ts | 27 ++ .../generated/instructions/apply5.d.ts.map | 1 + .../lib/generated/instructions/apply5.js | 131 +++++++ .../lib/generated/instructions/apply5.js.map | 1 + .../{ => generated}/instructions/index.d.ts | 2 +- .../lib/generated/instructions/index.d.ts.map | 1 + .../lib/generated/instructions/index.js | 26 ++ .../lib/generated/instructions/index.js.map | 1 + .../instructions/initializeComponent.d.ts | 18 + .../instructions/initializeComponent.d.ts.map | 1 + .../instructions/initializeComponent.js | 90 +++++ .../instructions/initializeComponent.js.map | 1 + .../instructions/initializeNewWorld.d.ts | 15 + .../instructions/initializeNewWorld.d.ts.map | 1 + .../instructions/initializeNewWorld.js | 75 ++++ .../instructions/initializeNewWorld.js.map | 1 + .../instructions/initializeRegistry.d.ts | 14 + .../instructions/initializeRegistry.d.ts.map | 1 + .../instructions/initializeRegistry.js | 70 ++++ .../instructions/initializeRegistry.js.map | 1 + clients/bolt-sdk/lib/index.d.ts | 29 +- clients/bolt-sdk/lib/index.d.ts.map | 2 +- clients/bolt-sdk/lib/index.js | 161 +++----- clients/bolt-sdk/lib/index.js.map | 2 +- .../bolt-sdk/lib/instructions/addEntity.d.ts | 24 -- .../lib/instructions/addEntity.d.ts.map | 1 - .../bolt-sdk/lib/instructions/addEntity.js | 137 ------- .../lib/instructions/addEntity.js.map | 1 - clients/bolt-sdk/lib/instructions/apply.d.ts | 25 -- .../bolt-sdk/lib/instructions/apply.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/apply.js | 139 ------- .../bolt-sdk/lib/instructions/apply.js.map | 1 - clients/bolt-sdk/lib/instructions/apply2.d.ts | 27 -- .../bolt-sdk/lib/instructions/apply2.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/apply2.js | 149 -------- .../bolt-sdk/lib/instructions/apply2.js.map | 1 - clients/bolt-sdk/lib/instructions/apply3.d.ts | 29 -- .../bolt-sdk/lib/instructions/apply3.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/apply3.js | 159 -------- .../bolt-sdk/lib/instructions/apply3.js.map | 1 - clients/bolt-sdk/lib/instructions/apply4.d.ts | 31 -- .../bolt-sdk/lib/instructions/apply4.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/apply4.js | 169 --------- .../bolt-sdk/lib/instructions/apply4.js.map | 1 - clients/bolt-sdk/lib/instructions/apply5.d.ts | 33 -- .../bolt-sdk/lib/instructions/apply5.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/apply5.js | 179 --------- .../bolt-sdk/lib/instructions/apply5.js.map | 1 - .../bolt-sdk/lib/instructions/index.d.ts.map | 1 - clients/bolt-sdk/lib/instructions/index.js | 42 --- .../bolt-sdk/lib/instructions/index.js.map | 1 - .../lib/instructions/initializeComponent.d.ts | 21 -- .../instructions/initializeComponent.d.ts.map | 1 - .../lib/instructions/initializeComponent.js | 141 ------- .../instructions/initializeComponent.js.map | 1 - .../lib/instructions/initializeNewWorld.d.ts | 18 - .../instructions/initializeNewWorld.d.ts.map | 1 - .../lib/instructions/initializeNewWorld.js | 115 ------ .../instructions/initializeNewWorld.js.map | 1 - .../lib/instructions/initializeRegistry.d.ts | 17 - .../instructions/initializeRegistry.d.ts.map | 1 - .../lib/instructions/initializeRegistry.js | 110 ------ .../instructions/initializeRegistry.js.map | 1 - .../lib/transactions/transactions.d.ts | 84 ----- .../lib/transactions/transactions.d.ts.map | 1 - .../bolt-sdk/lib/transactions/transactions.js | 345 ------------------ .../lib/transactions/transactions.js.map | 1 - clients/bolt-sdk/lib/world/transactions.d.ts | 51 +++ .../bolt-sdk/lib/world/transactions.d.ts.map | 1 + clients/bolt-sdk/lib/world/transactions.js | 198 ++++++++++ .../bolt-sdk/lib/world/transactions.js.map | 1 + clients/bolt-sdk/src/index.js | 50 --- clients/bolt-sdk/src/index.ts | 2 +- clients/bolt-sdk/src/world/transactions.ts | 20 +- package.json | 5 +- tests/bolt.ts | 143 +++----- 152 files changed, 2445 insertions(+), 3908 deletions(-) delete mode 100644 clients/bolt-sdk/lib/accounts/Entity.d.ts delete mode 100644 clients/bolt-sdk/lib/accounts/Entity.d.ts.map delete mode 100644 clients/bolt-sdk/lib/accounts/Entity.js delete mode 100644 clients/bolt-sdk/lib/accounts/Entity.js.map delete mode 100644 clients/bolt-sdk/lib/accounts/Registry.d.ts delete mode 100644 clients/bolt-sdk/lib/accounts/Registry.d.ts.map delete mode 100644 clients/bolt-sdk/lib/accounts/Registry.js delete mode 100644 clients/bolt-sdk/lib/accounts/Registry.js.map delete mode 100644 clients/bolt-sdk/lib/accounts/World.d.ts delete mode 100644 clients/bolt-sdk/lib/accounts/World.d.ts.map delete mode 100644 clients/bolt-sdk/lib/accounts/World.js delete mode 100644 clients/bolt-sdk/lib/accounts/World.js.map delete mode 100644 clients/bolt-sdk/lib/accounts/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/accounts/index.js delete mode 100644 clients/bolt-sdk/lib/accounts/index.js.map delete mode 100644 clients/bolt-sdk/lib/errors/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/errors/index.js delete mode 100644 clients/bolt-sdk/lib/errors/index.js.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.d.ts create mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.js create mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.js.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.d.ts create mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.js create mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.js.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/World.d.ts create mode 100644 clients/bolt-sdk/lib/generated/accounts/World.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/World.js create mode 100644 clients/bolt-sdk/lib/generated/accounts/World.js.map rename clients/bolt-sdk/lib/{ => generated}/accounts/index.d.ts (66%) create mode 100644 clients/bolt-sdk/lib/generated/accounts/index.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/accounts/index.js create mode 100644 clients/bolt-sdk/lib/generated/accounts/index.js.map rename clients/bolt-sdk/lib/{ => generated}/errors/index.d.ts (71%) create mode 100644 clients/bolt-sdk/lib/generated/errors/index.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/errors/index.js create mode 100644 clients/bolt-sdk/lib/generated/errors/index.js.map create mode 100644 clients/bolt-sdk/lib/generated/index.d.ts create mode 100644 clients/bolt-sdk/lib/generated/index.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/index.js create mode 100644 clients/bolt-sdk/lib/generated/index.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.js.map rename clients/bolt-sdk/lib/{ => generated}/instructions/index.d.ts (88%) create mode 100644 clients/bolt-sdk/lib/generated/instructions/index.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/index.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/index.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js create mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/addEntity.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/addEntity.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/addEntity.js delete mode 100644 clients/bolt-sdk/lib/instructions/addEntity.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/apply.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply.js delete mode 100644 clients/bolt-sdk/lib/instructions/apply.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply2.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/apply2.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply2.js delete mode 100644 clients/bolt-sdk/lib/instructions/apply2.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply3.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/apply3.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply3.js delete mode 100644 clients/bolt-sdk/lib/instructions/apply3.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply4.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/apply4.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply4.js delete mode 100644 clients/bolt-sdk/lib/instructions/apply4.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply5.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/apply5.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/apply5.js delete mode 100644 clients/bolt-sdk/lib/instructions/apply5.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/index.js delete mode 100644 clients/bolt-sdk/lib/instructions/index.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeComponent.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/initializeComponent.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeComponent.js delete mode 100644 clients/bolt-sdk/lib/instructions/initializeComponent.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeNewWorld.js delete mode 100644 clients/bolt-sdk/lib/instructions/initializeNewWorld.js.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts delete mode 100644 clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts.map delete mode 100644 clients/bolt-sdk/lib/instructions/initializeRegistry.js delete mode 100644 clients/bolt-sdk/lib/instructions/initializeRegistry.js.map delete mode 100644 clients/bolt-sdk/lib/transactions/transactions.d.ts delete mode 100644 clients/bolt-sdk/lib/transactions/transactions.d.ts.map delete mode 100644 clients/bolt-sdk/lib/transactions/transactions.js delete mode 100644 clients/bolt-sdk/lib/transactions/transactions.js.map create mode 100644 clients/bolt-sdk/lib/world/transactions.d.ts create mode 100644 clients/bolt-sdk/lib/world/transactions.d.ts.map create mode 100644 clients/bolt-sdk/lib/world/transactions.js create mode 100644 clients/bolt-sdk/lib/world/transactions.js.map delete mode 100644 clients/bolt-sdk/src/index.js diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ab5dd4b..2cf8ae3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -35,7 +35,7 @@ jobs: - name: Cache node dependencies uses: actions/cache@v3 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: install node_modules @@ -84,7 +84,7 @@ jobs: - name: Cache node dependencies uses: actions/cache@v4 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Run lint @@ -113,8 +113,9 @@ jobs: - name: Cache node dependencies uses: actions/cache@v3 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + - name: install node_modules run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" @@ -159,6 +160,12 @@ jobs: cargo install --path cli --force --locked bolt test + - name: Generate lib + run: | + cd clients/bolt-sdk + yarn build + cd ../.. + - name: Install the Bolt CLI and create & build a new project shell: bash run: | @@ -172,4 +179,4 @@ jobs: cargo update yarn add file:../clients/bolt-sdk/ -D # Overrides the bolt ts SDK with the local version bolt build - bolt test \ No newline at end of file + bolt test diff --git a/Anchor.toml b/Anchor.toml index 1505a20..5a3a7d9 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -8,6 +8,7 @@ skip-lint = false world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" [programs.localnet] +world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua" bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP" position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ" diff --git a/clients/bolt-sdk/lib/accounts/Entity.d.ts b/clients/bolt-sdk/lib/accounts/Entity.d.ts deleted file mode 100644 index 2cb66cc..0000000 --- a/clients/bolt-sdk/lib/accounts/Entity.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface EntityArgs { - id: beet.bignum; -} -export declare const entityDiscriminator: number[]; -export declare class Entity implements EntityArgs { - readonly id: beet.bignum; - private constructor(); - static fromArgs(args: EntityArgs): Entity; - static fromAccountInfo( - accountInfo: web3.AccountInfo, - offset?: number - ): [Entity, number]; - static fromAccountAddress( - connection: web3.Connection, - address: web3.PublicKey, - commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig - ): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - id: any; - accountDiscriminator: any; - }>; - static deserialize(buf: Buffer, offset?: number): [Entity, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption( - connection: web3.Connection, - commitment?: web3.Commitment - ): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - id: - | number - | { - toNumber: () => number; - }; - }; -} -export declare const entityBeet: beet.BeetStruct< - Entity, - EntityArgs & { - accountDiscriminator: number[]; - } ->; -//# sourceMappingURL=Entity.d.ts.map diff --git a/clients/bolt-sdk/lib/accounts/Entity.d.ts.map b/clients/bolt-sdk/lib/accounts/Entity.d.ts.map deleted file mode 100644 index 49c9ac4..0000000 --- a/clients/bolt-sdk/lib/accounts/Entity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,UAAuC,CAAC;AAQxE,qBAAa,MAAO,YAAW,UAAU;IACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM;IAA5C,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;IAQhC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,MAAM,EAAE,MAAM,CAAC;WAUN,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,MAAM,CAAC;IAiBlB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ7D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;CAYpD;AAMD,eAAO,MAAM,UAAU;0BAGG,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/Entity.js b/clients/bolt-sdk/lib/accounts/Entity.js deleted file mode 100644 index 2c843d8..0000000 --- a/clients/bolt-sdk/lib/accounts/Entity.js +++ /dev/null @@ -1,308 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [], - }, - f, - y, - t, - g; - return ( - (g = { next: verb(0), throw: verb(1), return: verb(2) }), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this; - }), - g - ); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t; - if (((y = 0), t)) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.entityBeet = exports.Entity = exports.entityDiscriminator = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.entityDiscriminator = [46, 157, 161, 161, 254, 46, 79, 24]; -var Entity = (function () { - function Entity(id) { - this.id = id; - } - Entity.fromArgs = function (args) { - return new Entity(args.id); - }; - Entity.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { - offset = 0; - } - return Entity.deserialize(accountInfo.data, offset); - }; - Entity.fromAccountAddress = function ( - connection, - address, - commitmentOrConfig - ) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error( - "Unable to find Entity account at ".concat(address) - ); - } - return [2, Entity.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - Entity.gpaBuilder = function (programId) { - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - return beetSolana.GpaBuilder.fromStruct(programId, exports.entityBeet); - }; - Entity.deserialize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return exports.entityBeet.deserialize(buf, offset); - }; - Entity.prototype.serialize = function () { - return exports.entityBeet.serialize( - __assign({ accountDiscriminator: exports.entityDiscriminator }, this) - ); - }; - Object.defineProperty(Entity, "byteSize", { - get: function () { - return exports.entityBeet.byteSize; - }, - enumerable: false, - configurable: true, - }); - Entity.getMinimumBalanceForRentExemption = function (connection, commitment) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [ - 2, - connection.getMinimumBalanceForRentExemption( - Entity.byteSize, - commitment - ), - ]; - }); - }); - }; - Entity.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return buf.byteLength - offset === Entity.byteSize; - }; - Entity.prototype.pretty = function () { - var _this = this; - return { - id: (function () { - var x = _this.id; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return Entity; -})(); -exports.Entity = Entity; -exports.entityBeet = new beet.BeetStruct( - [ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["id", beet.u64], - ], - Entity.fromArgs, - "Entity" -); -//# sourceMappingURL=Entity.js.map diff --git a/clients/bolt-sdk/lib/accounts/Entity.js.map b/clients/bolt-sdk/lib/accounts/Entity.js.map deleted file mode 100644 index c2ed83a..0000000 --- a/clients/bolt-sdk/lib/accounts/Entity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAWlD,QAAA,mBAAmB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAQxE;IACE,gBAA6B,E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AAiC,GAA9C,UACE,UAA2B,EAC3B,UAA4B;;;gBAE5B,WAAO,UAAU,CAAC,iCAAiC,CACjD,MAAM,CAAC,QAAQ,EACf,UAAU,CACX,EAAC;;;KACH;IAMM,yBAAkB,GAAzB,UAA0B,GAAW,EAAE,MAAU;QAAV,uBAAA,EAAA,UAAU;QAC/C,OAAO,GAAG,CAAC,UAAU,GAAG,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC;IACrD,CAAC;IAMD,uBAAM,GAAN;QAAA,iBAcC;QAbC,OAAO;YACL,EAAE,EAAE,CAAC;gBACH,IAAM,CAAC,GAAG,KAAI,CAAC,EAAgC,CAAC;gBAChD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,wBAAM;AAoIN,QAAA,UAAU,GAAG,IAAI,IAAI,CAAC,UAAU,CAM3C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;CACjB,EACD,MAAM,CAAC,QAAQ,EACf,QAAQ,CACT,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/Registry.d.ts b/clients/bolt-sdk/lib/accounts/Registry.d.ts deleted file mode 100644 index 23deb8b..0000000 --- a/clients/bolt-sdk/lib/accounts/Registry.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface RegistryArgs { - worlds: beet.bignum; -} -export declare const registryDiscriminator: number[]; -export declare class Registry implements RegistryArgs { - readonly worlds: beet.bignum; - private constructor(); - static fromArgs(args: RegistryArgs): Registry; - static fromAccountInfo( - accountInfo: web3.AccountInfo, - offset?: number - ): [Registry, number]; - static fromAccountAddress( - connection: web3.Connection, - address: web3.PublicKey, - commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig - ): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - accountDiscriminator: any; - worlds: any; - }>; - static deserialize(buf: Buffer, offset?: number): [Registry, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption( - connection: web3.Connection, - commitment?: web3.Commitment - ): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - worlds: - | number - | { - toNumber: () => number; - }; - }; -} -export declare const registryBeet: beet.BeetStruct< - Registry, - RegistryArgs & { - accountDiscriminator: number[]; - } ->; -//# sourceMappingURL=Registry.d.ts.map diff --git a/clients/bolt-sdk/lib/accounts/Registry.d.ts.map b/clients/bolt-sdk/lib/accounts/Registry.d.ts.map deleted file mode 100644 index cc2015a..0000000 --- a/clients/bolt-sdk/lib/accounts/Registry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../../src/generated/accounts/Registry.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,UAA0C,CAAC;AAQ7E,qBAAa,QAAS,YAAW,YAAY;IACvB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM;IAAhD,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY;IAQlC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,QAAQ,EAAE,MAAM,CAAC;WAUR,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,QAAQ,CAAC;IAiBpB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;IAQ/D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGqC,MAAM,MAAM;;;CAYxD;AAMD,eAAO,MAAM,YAAY;0BAGC,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/Registry.js b/clients/bolt-sdk/lib/accounts/Registry.js deleted file mode 100644 index 7d3d1bf..0000000 --- a/clients/bolt-sdk/lib/accounts/Registry.js +++ /dev/null @@ -1,314 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [], - }, - f, - y, - t, - g; - return ( - (g = { next: verb(0), throw: verb(1), return: verb(2) }), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this; - }), - g - ); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t; - if (((y = 0), t)) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.registryBeet = - exports.Registry = - exports.registryDiscriminator = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.registryDiscriminator = [47, 174, 110, 246, 184, 182, 252, 218]; -var Registry = (function () { - function Registry(worlds) { - this.worlds = worlds; - } - Registry.fromArgs = function (args) { - return new Registry(args.worlds); - }; - Registry.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { - offset = 0; - } - return Registry.deserialize(accountInfo.data, offset); - }; - Registry.fromAccountAddress = function ( - connection, - address, - commitmentOrConfig - ) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error( - "Unable to find Registry account at ".concat(address) - ); - } - return [2, Registry.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - Registry.gpaBuilder = function (programId) { - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - return beetSolana.GpaBuilder.fromStruct(programId, exports.registryBeet); - }; - Registry.deserialize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return exports.registryBeet.deserialize(buf, offset); - }; - Registry.prototype.serialize = function () { - return exports.registryBeet.serialize( - __assign({ accountDiscriminator: exports.registryDiscriminator }, this) - ); - }; - Object.defineProperty(Registry, "byteSize", { - get: function () { - return exports.registryBeet.byteSize; - }, - enumerable: false, - configurable: true, - }); - Registry.getMinimumBalanceForRentExemption = function ( - connection, - commitment - ) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [ - 2, - connection.getMinimumBalanceForRentExemption( - Registry.byteSize, - commitment - ), - ]; - }); - }); - }; - Registry.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return buf.byteLength - offset === Registry.byteSize; - }; - Registry.prototype.pretty = function () { - var _this = this; - return { - worlds: (function () { - var x = _this.worlds; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return Registry; -})(); -exports.Registry = Registry; -exports.registryBeet = new beet.BeetStruct( - [ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["worlds", beet.u64], - ], - Registry.fromArgs, - "Registry" -); -//# sourceMappingURL=Registry.js.map diff --git a/clients/bolt-sdk/lib/accounts/Registry.js.map b/clients/bolt-sdk/lib/accounts/Registry.js.map deleted file mode 100644 index 46c5a5e..0000000 --- a/clients/bolt-sdk/lib/accounts/Registry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3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AAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC;CACrB,EACD,QAAQ,CAAC,QAAQ,EACjB,UAAU,CACX,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/World.d.ts b/clients/bolt-sdk/lib/accounts/World.d.ts deleted file mode 100644 index 8adbfe2..0000000 --- a/clients/bolt-sdk/lib/accounts/World.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface WorldArgs { - id: beet.bignum; - entities: beet.bignum; -} -export declare const worldDiscriminator: number[]; -export declare class World implements WorldArgs { - readonly id: beet.bignum; - readonly entities: beet.bignum; - private constructor(); - static fromArgs(args: WorldArgs): World; - static fromAccountInfo( - accountInfo: web3.AccountInfo, - offset?: number - ): [World, number]; - static fromAccountAddress( - connection: web3.Connection, - address: web3.PublicKey, - commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig - ): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - id: any; - accountDiscriminator: any; - entities: any; - }>; - static deserialize(buf: Buffer, offset?: number): [World, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption( - connection: web3.Connection, - commitment?: web3.Commitment - ): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - id: - | number - | { - toNumber: () => number; - }; - entities: - | number - | { - toNumber: () => number; - }; - }; -} -export declare const worldBeet: beet.BeetStruct< - World, - WorldArgs & { - accountDiscriminator: number[]; - } ->; -//# sourceMappingURL=World.d.ts.map diff --git a/clients/bolt-sdk/lib/accounts/World.d.ts.map b/clients/bolt-sdk/lib/accounts/World.d.ts.map deleted file mode 100644 index 4e40c05..0000000 --- a/clients/bolt-sdk/lib/accounts/World.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"World.d.ts","sourceRoot":"","sources":["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,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;sBAWN,MAAM,MAAM;;;CAY1D;AAMD,eAAO,MAAM,SAAS;0BAGI,MAAM,EAAE;EAUjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/World.js b/clients/bolt-sdk/lib/accounts/World.js deleted file mode 100644 index 33e233e..0000000 --- a/clients/bolt-sdk/lib/accounts/World.js +++ /dev/null @@ -1,321 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [], - }, - f, - y, - t, - g; - return ( - (g = { next: verb(0), throw: verb(1), return: verb(2) }), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this; - }), - g - ); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t; - if (((y = 0), t)) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.worldBeet = exports.World = exports.worldDiscriminator = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.worldDiscriminator = [145, 45, 170, 174, 122, 32, 155, 124]; -var World = (function () { - function World(id, entities) { - this.id = id; - this.entities = entities; - } - World.fromArgs = function (args) { - return new World(args.id, args.entities); - }; - World.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { - offset = 0; - } - return World.deserialize(accountInfo.data, offset); - }; - World.fromAccountAddress = function ( - connection, - address, - commitmentOrConfig - ) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error( - "Unable to find World account at ".concat(address) - ); - } - return [2, World.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - World.gpaBuilder = function (programId) { - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - return beetSolana.GpaBuilder.fromStruct(programId, exports.worldBeet); - }; - World.deserialize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return exports.worldBeet.deserialize(buf, offset); - }; - World.prototype.serialize = function () { - return exports.worldBeet.serialize( - __assign({ accountDiscriminator: exports.worldDiscriminator }, this) - ); - }; - Object.defineProperty(World, "byteSize", { - get: function () { - return exports.worldBeet.byteSize; - }, - enumerable: false, - configurable: true, - }); - World.getMinimumBalanceForRentExemption = function (connection, commitment) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [ - 2, - connection.getMinimumBalanceForRentExemption( - World.byteSize, - commitment - ), - ]; - }); - }); - }; - World.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { - offset = 0; - } - return buf.byteLength - offset === World.byteSize; - }; - World.prototype.pretty = function () { - var _this = this; - return { - id: (function () { - var x = _this.id; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } catch (_) { - return x; - } - } - return x; - })(), - entities: (function () { - var x = _this.entities; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return World; -})(); -exports.World = World; -exports.worldBeet = new beet.BeetStruct( - [ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["id", beet.u64], - ["entities", beet.u64], - ], - World.fromArgs, - "World" -); -//# sourceMappingURL=World.js.map diff --git a/clients/bolt-sdk/lib/accounts/World.js.map b/clients/bolt-sdk/lib/accounts/World.js.map deleted file mode 100644 index f14e841..0000000 --- a/clients/bolt-sdk/lib/accounts/World.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"World.js","sourceRoot":"","sources":["../../src/generated/accounts/World.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAYlD,QAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAQzE;IACE,eACW,EAAe,EACf,QAAqB;QADrB,OAAE,GAAF,EAAE,CAAa;QACf,aAAQ,GAAR,QAAQ,CAAa;IAC7B,CAAC;IAKG,cAAQ,GAAf,UAAgB,IAAe;QAC7B,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAMM,qBAAe,GAAtB,UACE,WAAqC,EACrC,MAAU;QAAV,uBAAA,EAAA,UAAU;QAEV,OAAO,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC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AN;QAAA,iBAyBC;QAxBC,OAAO;YACL,EAAE,EAAE,CAAC;gBACH,IAAM,CAAC,GAAG,KAAI,CAAC,EAAgC,CAAC;gBAChD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;YACJ,QAAQ,EAAE,CAAC;gBACT,IAAM,CAAC,GAAG,KAAI,CAAC,QAAsC,CAAC;gBACtD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,YAAC;AAAD,CAAC,AA5ID,IA4IC;AA5IY,sBAAK;AAkJL,QAAA,SAAS,GAAG,IAAI,IAAI,CAAC,UAAU,CAM1C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;IAChB,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC;CACvB,EACD,KAAK,CAAC,QAAQ,EACd,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/index.d.ts.map b/clients/bolt-sdk/lib/accounts/index.d.ts.map deleted file mode 100644 index 29a1dba..0000000 --- a/clients/bolt-sdk/lib/accounts/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;CAA8B,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/index.js b/clients/bolt-sdk/lib/accounts/index.js deleted file mode 100644 index 992af65..0000000 --- a/clients/bolt-sdk/lib/accounts/index.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.accountProviders = void 0; -var Entity_1 = require("./Entity"); -var Registry_1 = require("./Registry"); -var World_1 = require("./World"); -__exportStar(require("./Entity"), exports); -__exportStar(require("./Registry"), exports); -__exportStar(require("./World"), exports); -exports.accountProviders = { - Entity: Entity_1.Entity, - Registry: Registry_1.Registry, - World: World_1.World, -}; -//# sourceMappingURL=index.js.map diff --git a/clients/bolt-sdk/lib/accounts/index.js.map b/clients/bolt-sdk/lib/accounts/index.js.map deleted file mode 100644 index 53acdd8..0000000 --- a/clients/bolt-sdk/lib/accounts/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAkC;AAClC,uCAAsC;AACtC,iCAAgC;AAEhC,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AAEX,QAAA,gBAAgB,GAAG,EAAE,MAAM,iBAAA,EAAE,QAAQ,qBAAA,EAAE,KAAK,eAAA,EAAE,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.d.ts b/clients/bolt-sdk/lib/delegation/accounts.d.ts index 7988ff1..b12885e 100644 --- a/clients/bolt-sdk/lib/delegation/accounts.d.ts +++ b/clients/bolt-sdk/lib/delegation/accounts.d.ts @@ -1,15 +1,10 @@ import { PublicKey } from "@solana/web3.js"; -export declare const DELEGATION_PROGRAM_ID = - "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; -export declare function getDelegationAccounts( - accountToDelegate: PublicKey, - ownerProgram: PublicKey, - ownedBuffer?: boolean -): { - delegationPda: PublicKey; - delegatedAccountSeedsPda: PublicKey; - bufferPda: PublicKey; - commitStateRecordPda: PublicKey; - commitStatePda: PublicKey; +export declare const DELEGATION_PROGRAM_ID = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; +export declare function getDelegationAccounts(accountToDelegate: PublicKey, ownerProgram: PublicKey, ownedBuffer?: boolean): { + delegationPda: PublicKey; + delegatedAccountSeedsPda: PublicKey; + bufferPda: PublicKey; + commitStateRecordPda: PublicKey; + commitStatePda: PublicKey; }; -//# sourceMappingURL=accounts.d.ts.map +//# sourceMappingURL=accounts.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.d.ts.map b/clients/bolt-sdk/lib/delegation/accounts.d.ts.map index 005c384..f5336b0 100644 --- a/clients/bolt-sdk/lib/delegation/accounts.d.ts.map +++ b/clients/bolt-sdk/lib/delegation/accounts.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/generated/delegation/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,eAAO,MAAM,qBAAqB,iDACc,CAAC;AAEjD,wBAAgB,qBAAqB,CACnC,iBAAiB,EAAE,SAAS,EAC5B,YAAY,EAAE,SAAS,EACvB,WAAW,GAAE,OAAc;;;;;;EAqC5B"} \ No newline at end of file +{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/delegation/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,eAAO,MAAM,qBAAqB,iDACc,CAAC;AAEjD,wBAAgB,qBAAqB,CACnC,iBAAiB,EAAE,SAAS,EAC5B,YAAY,EAAE,SAAS,EACvB,WAAW,GAAE,OAAc;;;;;;EAqC5B"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.js b/clients/bolt-sdk/lib/delegation/accounts.js index fe0a76f..393bce6 100644 --- a/clients/bolt-sdk/lib/delegation/accounts.js +++ b/clients/bolt-sdk/lib/delegation/accounts.js @@ -9,39 +9,22 @@ var SEED_COMMIT_STATE_RECORD_PDA = "commit-state-record"; var SEED_STATE_DIFF_PDA = "state-diff"; exports.DELEGATION_PROGRAM_ID = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; function getDelegationAccounts(accountToDelegate, ownerProgram, ownedBuffer) { - if (ownedBuffer === void 0) { - ownedBuffer = true; - } - var pdaBytes = accountToDelegate.toBytes(); - var delegationPda = web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(SEED_DELEGATION_PDA), pdaBytes], - new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID) - )[0]; - var delegatedAccountSeedsPda = web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(DELEGATED_ACCOUNT_SEEDS), pdaBytes], - new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID) - )[0]; - var bufferPda = web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(SEED_BUFFER_PDA), pdaBytes], - ownedBuffer - ? new web3_js_1.PublicKey(ownerProgram) - : new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID) - )[0]; - var commitStateRecordPda = web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(SEED_COMMIT_STATE_RECORD_PDA), pdaBytes], - new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID) - )[0]; - var commitStatePda = web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(SEED_STATE_DIFF_PDA), pdaBytes], - new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID) - )[0]; - return { - delegationPda: delegationPda, - delegatedAccountSeedsPda: delegatedAccountSeedsPda, - bufferPda: bufferPda, - commitStateRecordPda: commitStateRecordPda, - commitStatePda: commitStatePda, - }; + if (ownedBuffer === void 0) { ownedBuffer = true; } + var pdaBytes = accountToDelegate.toBytes(); + var delegationPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_DELEGATION_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; + var delegatedAccountSeedsPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(DELEGATED_ACCOUNT_SEEDS), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; + var bufferPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_BUFFER_PDA), pdaBytes], ownedBuffer + ? new web3_js_1.PublicKey(ownerProgram) + : new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; + var commitStateRecordPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_COMMIT_STATE_RECORD_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; + var commitStatePda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_STATE_DIFF_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; + return { + delegationPda: delegationPda, + delegatedAccountSeedsPda: delegatedAccountSeedsPda, + bufferPda: bufferPda, + commitStateRecordPda: commitStateRecordPda, + commitStatePda: commitStatePda, + }; } exports.getDelegationAccounts = getDelegationAccounts; -//# sourceMappingURL=accounts.js.map +//# sourceMappingURL=accounts.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.js.map b/clients/bolt-sdk/lib/delegation/accounts.js.map index e9d68c2..bc77c6e 100644 --- a/clients/bolt-sdk/lib/delegation/accounts.js.map +++ b/clients/bolt-sdk/lib/delegation/accounts.js.map @@ -1 +1 @@ -{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/generated/delegation/accounts.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAE5C,IAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,IAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,IAAM,uBAAuB,GAAG,eAAe,CAAC;AAChD,IAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAC3D,IAAM,mBAAmB,GAAG,YAAY,CAAC;AAC5B,QAAA,qBAAqB,GAChC,8CAA8C,CAAC;AAEjD,SAAgB,qBAAqB,CACnC,iBAA4B,EAC5B,YAAuB,EACvB,WAA2B;IAA3B,4BAAA,EAAA,kBAA2B;IAE3B,IAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAEtC,IAAA,aAAa,GAAI,mBAAS,CAAC,sBAAsB,CACtD,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,QAAQ,CAAC,EAC5C,IAAI,mBAAS,CAAC,6BAAqB,CAAC,CACrC,GAHmB,CAGlB;IAEK,IAAA,wBAAwB,GAAI,mBAAS,CAAC,sBAAsB,CACjE,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,QAAQ,CAAC,EAChD,IAAI,mBAAS,CAAC,6BAAqB,CAAC,CACrC,GAH8B,CAG7B;IAEK,IAAA,SAAS,GAAI,mBAAS,CAAC,sBAAsB,CAClD,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,EACxC,WAAW;QACT,CAAC,CAAC,IAAI,mBAAS,CAAC,YAAY,CAAC;QAC7B,CAAC,CAAC,IAAI,mBAAS,CAAC,6BAAqB,CAAC,CACzC,GALe,CAKd;IAEK,IAAA,oBAAoB,GAAI,mBAAS,CAAC,sBAAsB,CAC7D,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,EAAE,QAAQ,CAAC,EACrD,IAAI,mBAAS,CAAC,6BAAqB,CAAC,CACrC,GAH0B,CAGzB;IAEK,IAAA,cAAc,GAAI,mBAAS,CAAC,sBAAsB,CACvD,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,QAAQ,CAAC,EAC5C,IAAI,mBAAS,CAAC,6BAAqB,CAAC,CACrC,GAHoB,CAGnB;IACF,OAAO;QACL,aAAa,eAAA;QACb,wBAAwB,0BAAA;QACxB,SAAS,WAAA;QACT,oBAAoB,sBAAA;QACpB,cAAc,gBAAA;KACf,CAAC;AACJ,CAAC;AAxCD,sDAwCC"} \ No newline at end of file +{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/delegation/accounts.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAE5C,IAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,IAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,IAAM,uBAAuB,GAAG,eAAe,CAAC;AAChD,IAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAC3D,IAAM,mBAAmB,GAAG,YAAY,CAAC;AAC5B,QAAA,qBAAqB,GAChC,8CAA8C,CAAC;AAEjD,SAAgB,qBAAqB,CACnC,iBAA4B,EAC5B,YAAuB,EACvB,WAA2B;IAA3B,4BAAA,EAAA,kBAA2B;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/delegate.d.ts index f2651ef..69804f7 100644 --- a/clients/bolt-sdk/lib/delegation/delegate.d.ts +++ b/clients/bolt-sdk/lib/delegation/delegate.d.ts @@ -1,30 +1,23 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; export interface DelegateInstructionArgs { - validUntil: beet.bignum; - commitFrequencyMs: number; + validUntil: beet.bignum; + commitFrequencyMs: number; } -export declare const delegateStruct: beet.FixableBeetArgsStruct< - DelegateInstructionArgs & { +export declare const delegateStruct: beet.FixableBeetArgsStruct; +}>; export interface DelegateInstructionAccounts { - payer: web3.PublicKey; - entity: web3.PublicKey; - account: web3.PublicKey; - ownerProgram: web3.PublicKey; - buffer?: web3.PublicKey; - delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; - delegationProgram?: web3.PublicKey; - systemProgram?: web3.PublicKey; + payer: web3.PublicKey; + entity: web3.PublicKey; + account: web3.PublicKey; + ownerProgram: web3.PublicKey; + buffer?: web3.PublicKey; + delegationRecord?: web3.PublicKey; + delegateAccountSeeds?: web3.PublicKey; + delegationProgram?: web3.PublicKey; + systemProgram?: web3.PublicKey; } export declare const delegateInstructionDiscriminator: number[]; -export declare function createDelegateInstruction( - accounts: DelegateInstructionAccounts, - validUntil?: beet.bignum, - commitFrequencyMs?: number, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=delegate.d.ts.map +export declare function createDelegateInstruction(accounts: DelegateInstructionAccounts, validUntil?: beet.bignum, commitFrequencyMs?: number, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=delegate.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.d.ts.map b/clients/bolt-sdk/lib/delegation/delegate.d.ts.map index 8c2d200..576f437 100644 --- a/clients/bolt-sdk/lib/delegation/delegate.d.ts.map +++ b/clients/bolt-sdk/lib/delegation/delegate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/generated/delegation/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;8BAEG,MAAM,EAAE;EASrC,CAAC;AAOF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,gCAAgC,UAE5C,CAAC;AAMF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,UAAU,GAAE,IAAI,CAAC,MAAU,EAC3B,iBAAiB,GAAE,MAAc,EACjC,SAAS,iBAAwB,+BAiElC"} \ No newline at end of file +{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/delegation/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;8BAEG,MAAM,EAAE;EASrC,CAAC;AAOF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,gCAAgC,UAE5C,CAAC;AAMF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,UAAU,GAAE,IAAI,CAAC,MAAU,EAC3B,iBAAiB,GAAE,MAAc,EACjC,SAAS,iBAAwB,+BAiElC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.js b/clients/bolt-sdk/lib/delegation/delegate.js index 6e53cd8..cf25621 100644 --- a/clients/bolt-sdk/lib/delegation/delegate.js +++ b/clients/bolt-sdk/lib/delegation/delegate.js @@ -1,157 +1,103 @@ "use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; - }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.createDelegateInstruction = - exports.delegateInstructionDiscriminator = - exports.delegateStruct = - void 0; +exports.createDelegateInstruction = exports.delegateInstructionDiscriminator = exports.delegateStruct = void 0; var beet = __importStar(require("@metaplex-foundation/beet")); var web3 = __importStar(require("@solana/web3.js")); var accounts_1 = require("./accounts"); -exports.delegateStruct = new beet.FixableBeetArgsStruct( - [ +exports.delegateStruct = new beet.FixableBeetArgsStruct([ ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], ["validUntil", beet.i64], ["commitFrequencyMs", beet.u32], - ], - "DelegateInstructionArgs" -); -exports.delegateInstructionDiscriminator = [90, 147, 75, 178, 85, 88, 4, 137]; -function createDelegateInstruction( - accounts, - validUntil, - commitFrequencyMs, - programId -) { - var _a, _b, _c, _d, _e; - if (validUntil === void 0) { - validUntil = 0; - } - if (commitFrequencyMs === void 0) { - commitFrequencyMs = 30000; - } - if (programId === void 0) { - programId = accounts.ownerProgram; - } - var data = exports.delegateStruct.serialize({ - instructionDiscriminator: exports.delegateInstructionDiscriminator, - validUntil: validUntil, - commitFrequencyMs: commitFrequencyMs, - })[0]; - var _f = (0, accounts_1.getDelegationAccounts)( - accounts.account, - accounts.ownerProgram - ), - delegationPda = _f.delegationPda, - delegatedAccountSeedsPda = _f.delegatedAccountSeedsPda, - bufferPda = _f.bufferPda; - var keys = [ - { - pubkey: accounts.payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: accounts.entity, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.account, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.ownerProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_b = accounts.delegationRecord) !== null && _b !== void 0 - ? _b - : delegationPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_c = accounts.delegateAccountSeeds) !== null && _c !== void 0 - ? _c - : delegatedAccountSeedsPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_d = accounts.delegationProgram) !== null && _d !== void 0 - ? _d - : new web3.PublicKey(accounts_1.DELEGATION_PROGRAM_ID), - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_e = accounts.systemProgram) !== null && _e !== void 0 - ? _e - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - return new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); +], "DelegateInstructionArgs"); +exports.delegateInstructionDiscriminator = [ + 90, 147, 75, 178, 85, 88, 4, 137, +]; +function createDelegateInstruction(accounts, validUntil, commitFrequencyMs, programId) { + var _a, _b, _c, _d, _e; + if (validUntil === void 0) { validUntil = 0; } + if (commitFrequencyMs === void 0) { commitFrequencyMs = 30000; } + if (programId === void 0) { programId = accounts.ownerProgram; } + var data = exports.delegateStruct.serialize({ + instructionDiscriminator: exports.delegateInstructionDiscriminator, + validUntil: validUntil, + commitFrequencyMs: commitFrequencyMs, + })[0]; + var _f = (0, accounts_1.getDelegationAccounts)(accounts.account, accounts.ownerProgram), delegationPda = _f.delegationPda, delegatedAccountSeedsPda = _f.delegatedAccountSeedsPda, bufferPda = _f.bufferPda; + var keys = [ + { + pubkey: accounts.payer, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.entity, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.account, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.ownerProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_b = accounts.delegationRecord) !== null && _b !== void 0 ? _b : delegationPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_c = accounts.delegateAccountSeeds) !== null && _c !== void 0 ? _c : delegatedAccountSeedsPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_d = accounts.delegationProgram) !== null && _d !== void 0 ? _d : new web3.PublicKey(accounts_1.DELEGATION_PROGRAM_ID), + isWritable: false, + isSigner: false, + }, + { + pubkey: (_e = accounts.systemProgram) !== null && _e !== void 0 ? _e : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + return new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); } exports.createDelegateInstruction = createDelegateInstruction; -//# sourceMappingURL=delegate.js.map +//# sourceMappingURL=delegate.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.js.map b/clients/bolt-sdk/lib/delegation/delegate.js.map index a12bc1d..be24f37 100644 --- a/clients/bolt-sdk/lib/delegation/delegate.js.map +++ b/clients/bolt-sdk/lib/delegation/delegate.js.map @@ -1 +1 @@ -{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/generated/delegation/delegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,o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B;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,YAAY;YAC7B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,MAAM,mCAAI,SAAS;YACpC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,gBAAgB,mCAAI,aAAa;YAClD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,oBAAoB,mCAAI,wBAAwB;YACjE,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EACJ,MAAA,QAAQ,CAAC,iBAAiB,mCAAI,IAAI,IAAI,CAAC,SAAS,CAAC,gCAAqB,CAAC;YACzE,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AArED,8DAqEC"} \ No newline at end of file +{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/delegation/delegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,oDAAwC;AACxC,uCAA0E;AAO7D,QAAA,cAAc,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAK1D;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,YAAY,EAAE,I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AE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,gBAAgB,mCAAI,aAAa;YAClD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,oBAAoB,mCAAI,wBAAwB;YACjE,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EACJ,MAAA,QAAQ,CAAC,iBAAiB,mCAAI,IAAI,IAAI,CAAC,SAAS,CAAC,gCAAqB,CAAC;YACzE,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AArED,8DAqEC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.d.ts b/clients/bolt-sdk/lib/delegation/undelegate.d.ts index 58d439f..03257c3 100644 --- a/clients/bolt-sdk/lib/delegation/undelegate.d.ts +++ b/clients/bolt-sdk/lib/delegation/undelegate.d.ts @@ -1,23 +1,20 @@ import * as beet from "@metaplex-foundation/beet"; import * as web3 from "@solana/web3.js"; export declare const undelegateStruct: beet.FixableBeetArgsStruct<{ - instructionDiscriminator: number[]; + instructionDiscriminator: number[]; }>; export interface UndelegateInstructionAccounts { - payer: web3.PublicKey; - delegatedAccount: web3.PublicKey; - ownerProgram: web3.PublicKey; - buffer?: web3.PublicKey; - commitStatePda?: web3.PublicKey; - commitStateRecordPda?: web3.PublicKey; - delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; - reimbursement: web3.PublicKey; - systemProgram?: web3.PublicKey; + payer: web3.PublicKey; + delegatedAccount: web3.PublicKey; + ownerProgram: web3.PublicKey; + buffer?: web3.PublicKey; + commitStatePda?: web3.PublicKey; + commitStateRecordPda?: web3.PublicKey; + delegationRecord?: web3.PublicKey; + delegateAccountSeeds?: web3.PublicKey; + reimbursement: web3.PublicKey; + systemProgram?: web3.PublicKey; } export declare const undelegateInstructionDiscriminator: number[]; -export declare function createUndelegateInstruction( - accounts: UndelegateInstructionAccounts, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=undelegate.d.ts.map +export declare function createUndelegateInstruction(accounts: UndelegateInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=undelegate.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map b/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map index 9abf37f..7a0c347 100644 --- a/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map +++ b/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"undelegate.d.ts","sourceRoot":"","sources":["../../src/generated/delegation/undelegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,eAAO,MAAM,gBAAgB;8BACD,MAAM,EAAE;EAInC,CAAC;AAMF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAChC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,kCAAkC,UAA2B,CAAC;AAO3E,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,6BAA6B,EACvC,SAAS,iBAAuC,+BA4EjD"} \ No newline at end of file +{"version":3,"file":"undelegate.d.ts","sourceRoot":"","sources":["../../src/delegation/undelegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,eAAO,MAAM,gBAAgB;8BACD,MAAM,EAAE;EAInC,CAAC;AAMF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAChC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,kCAAkC,UAA2B,CAAC;AAO3E,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,6BAA6B,EACvC,SAAS,iBAAuC,+BA4EjD"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.js b/clients/bolt-sdk/lib/delegation/undelegate.js index 88d6801..2005625 100644 --- a/clients/bolt-sdk/lib/delegation/undelegate.js +++ b/clients/bolt-sdk/lib/delegation/undelegate.js @@ -1,152 +1,99 @@ "use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; - }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.createUndelegateInstruction = - exports.undelegateInstructionDiscriminator = - exports.undelegateStruct = - void 0; +exports.createUndelegateInstruction = exports.undelegateInstructionDiscriminator = exports.undelegateStruct = void 0; var beet = __importStar(require("@metaplex-foundation/beet")); var web3 = __importStar(require("@solana/web3.js")); var accounts_1 = require("./accounts"); var web3_js_1 = require("@solana/web3.js"); -exports.undelegateStruct = new beet.FixableBeetArgsStruct( - [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], - "UndelegateInstructionArgs" -); +exports.undelegateStruct = new beet.FixableBeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "UndelegateInstructionArgs"); exports.undelegateInstructionDiscriminator = [3, 0, 0, 0, 0, 0, 0, 0]; function createUndelegateInstruction(accounts, programId) { - var _a, _b, _c, _d, _e, _f; - if (programId === void 0) { - programId = new web3_js_1.PublicKey(accounts_1.DELEGATION_PROGRAM_ID); - } - var data = exports.undelegateStruct.serialize({ - instructionDiscriminator: exports.undelegateInstructionDiscriminator, - })[0]; - var _g = (0, accounts_1.getDelegationAccounts)( - accounts.delegatedAccount, - accounts.ownerProgram, - false - ), - delegationPda = _g.delegationPda, - delegatedAccountSeedsPda = _g.delegatedAccountSeedsPda, - bufferPda = _g.bufferPda, - commitStateRecordPda = _g.commitStateRecordPda, - commitStatePda = _g.commitStatePda; - var keys = [ - { - pubkey: accounts.payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: accounts.delegatedAccount, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.ownerProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_b = accounts.commitStatePda) !== null && _b !== void 0 - ? _b - : commitStatePda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_c = accounts.commitStateRecordPda) !== null && _c !== void 0 - ? _c - : commitStateRecordPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_d = accounts.delegationRecord) !== null && _d !== void 0 - ? _d - : delegationPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_e = accounts.delegateAccountSeeds) !== null && _e !== void 0 - ? _e - : delegatedAccountSeedsPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.reimbursement, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_f = accounts.systemProgram) !== null && _f !== void 0 - ? _f - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - return new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); + var _a, _b, _c, _d, _e, _f; + if (programId === void 0) { programId = new web3_js_1.PublicKey(accounts_1.DELEGATION_PROGRAM_ID); } + var data = exports.undelegateStruct.serialize({ + instructionDiscriminator: exports.undelegateInstructionDiscriminator, + })[0]; + var _g = (0, accounts_1.getDelegationAccounts)(accounts.delegatedAccount, accounts.ownerProgram, false), delegationPda = _g.delegationPda, delegatedAccountSeedsPda = _g.delegatedAccountSeedsPda, bufferPda = _g.bufferPda, commitStateRecordPda = _g.commitStateRecordPda, commitStatePda = _g.commitStatePda; + var keys = [ + { + pubkey: accounts.payer, + isWritable: false, + isSigner: true, + }, + { + pubkey: accounts.delegatedAccount, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.ownerProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_b = accounts.commitStatePda) !== null && _b !== void 0 ? _b : commitStatePda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_c = accounts.commitStateRecordPda) !== null && _c !== void 0 ? _c : commitStateRecordPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_d = accounts.delegationRecord) !== null && _d !== void 0 ? _d : delegationPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_e = accounts.delegateAccountSeeds) !== null && _e !== void 0 ? _e : delegatedAccountSeedsPda, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.reimbursement, + isWritable: false, + isSigner: false, + }, + { + pubkey: (_f = accounts.systemProgram) !== null && _f !== void 0 ? _f : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + return new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); } exports.createUndelegateInstruction = createUndelegateInstruction; -//# sourceMappingURL=undelegate.js.map +//# sourceMappingURL=undelegate.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.js.map b/clients/bolt-sdk/lib/delegation/undelegate.js.map index 2b6d7f0..844692e 100644 --- a/clients/bolt-sdk/lib/delegation/undelegate.js.map +++ b/clients/bolt-sdk/lib/delegation/undelegate.js.map @@ -1 +1 @@ -{"version":3,"file":"undelegate.js","sourceRoot":"","sources":["../../src/generated/delegation/undelegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,oDAAwC;AACxC,uCAA0E;AAC1E,2CAA4C;AAE/B,QAAA,gBAAgB,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAG5D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,2BAA2B,CAC5B,CAAC;AAmBW,QAAA,kCAAkC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAO3E,SAAgB,2BAA2B,CACzC,QAAuC,EACvC,SAAgD;;IAAhD,0BAAA,EAAA,gBAAgB,mBAAS,CAAC,gCAAqB,CAAC;IAEzC,IAAA,IAAI,GAAI,wBAAgB,CAAC,SAAS,CAAC;QACxC,wBAAwB,EAAE,0CAAkC;KAC7D,CAAC,GAFS,CAER;IAEG,IAAA,KAMF,IAAA,gCAAqB,EACvB,QAAQ,CAAC,gBAAgB,EACzB,QAAQ,CAAC,YAAY,EACrB,KAAK,CACN,EATC,aAAa,mBAAA,EACb,wBAAwB,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EF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AA9ED,kEA8EC"} \ No newline at end of file +{"version":3,"file":"undelegate.js","sourceRoot":"","sources":["../../src/delegation/undelegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,oDAAwC;AACxC,uCAA0E;AAC1E,2CAA4C;AAE/B,QAAA,gBAAgB,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAG5D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,2BAA2B,CAC5B,CAAC;AAmBW,QAAA,kCAAkC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAO3E,SAAgB,2BAA2B,CACzC,QAAuC,EACvC,SAAgD;;IAAhD,0BAAA,EAAA,gBAAgB,mBAAS,CAAC,gCAAqB,CAAC;IAEzC,IAAA,IAAI,GAAI,wBAAgB,CAAC,SAAS,CAAC;QACxC,wBAAwB,EAAE,0CAAkC;KAC7D,CAAC,GAFS,CAER;IAEG,IAAA,KAMF,IAAA,gCAAqB,EACvB,QAAQ,CAAC,gBAAgB,EACzB,QAAQ,CAAC,YAAY,EACrB,KAAK,CACN,EATC,aAAa,mBAAA,EACb,wBAAwB,8BAAA,EACxB,SAAS,eAAA,EACT,oBAAoB,0BAAA,EACpB,cAAc,oBAKf,CAAC;IAEF,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,gBAAgB;YACjC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,YAAY;YAC7B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,MAAM,mCAAI,SAAS;YACpC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,cAAc,mCAAI,cAAc;YACjD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,oBAAoB,mCAAI,oBAAoB;YAC7D,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,gBAAgB,mCAAI,aAAa;YAClD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,oBAAoB,mCAAI,wBAAwB;YACjE,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,aAAa;YAC9B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AA9ED,kEA8EC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/errors/index.d.ts.map b/clients/bolt-sdk/lib/errors/index.d.ts.map deleted file mode 100644 index 970e1f1..0000000 --- a/clients/bolt-sdk/lib/errors/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/errors/index.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9C,KAAK,kBAAkB,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;AAW3D,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAsB;;CAO5C;AAaD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D;AAOD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/errors/index.js b/clients/bolt-sdk/lib/errors/index.js deleted file mode 100644 index 02fb58f..0000000 --- a/clients/bolt-sdk/lib/errors/index.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -var __extends = - (this && this.__extends) || - (function () { - var extendStatics = function (d, b) { - extendStatics = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (d, b) { - d.__proto__ = b; - }) || - function (d, b) { - for (var p in b) - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError( - "Class extends value " + String(b) + " is not a constructor or null" - ); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = - b === null - ? Object.create(b) - : ((__.prototype = b.prototype), new __()); - }; - })(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.errorFromName = - exports.errorFromCode = - exports.InvalidAuthorityError = - void 0; -var createErrorFromCodeLookup = new Map(); -var createErrorFromNameLookup = new Map(); -var InvalidAuthorityError = (function (_super) { - __extends(InvalidAuthorityError, _super); - function InvalidAuthorityError() { - var _this = _super.call(this, "Invalid authority for instruction") || this; - _this.code = 0x1770; - _this.name = "InvalidAuthority"; - if (typeof Error.captureStackTrace === "function") { - Error.captureStackTrace(_this, InvalidAuthorityError); - } - return _this; - } - return InvalidAuthorityError; -})(Error); -exports.InvalidAuthorityError = InvalidAuthorityError; -createErrorFromCodeLookup.set(0x1770, function () { - return new InvalidAuthorityError(); -}); -createErrorFromNameLookup.set("InvalidAuthority", function () { - return new InvalidAuthorityError(); -}); -function errorFromCode(code) { - var createError = createErrorFromCodeLookup.get(code); - return createError != null ? createError() : null; -} -exports.errorFromCode = errorFromCode; -function errorFromName(name) { - var createError = createErrorFromNameLookup.get(name); - return createError != null ? createError() : null; -} -exports.errorFromName = errorFromName; -//# sourceMappingURL=index.js.map diff --git a/clients/bolt-sdk/lib/errors/index.js.map b/clients/bolt-sdk/lib/errors/index.js.map deleted file mode 100644 index 3be5dca..0000000 --- a/clients/bolt-sdk/lib/errors/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUA,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AACzE,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AAQzE;IAA2C,yCAAK;IAG9C;QAAA,YACE,kBAAM,mCAAmC,CAAC,SAI3C;QAPQ,UAAI,GAAW,MAAM,CAAC;QACtB,UAAI,GAAW,kBAAkB,CAAC;QAGzC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,UAAU,EAAE;YACjD,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,qBAAqB,CAAC,CAAC;SACtD;;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AATD,CAA2C,KAAK,GAS/C;AATY,sDAAqB;AAWlC,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAAC,CAAC;AACzE,yBAAyB,CAAC,GAAG,CAC3B,kBAAkB,EAClB,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAClC,CAAC;AAOF,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC;AAOD,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts new file mode 100644 index 0000000..bb532ae --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts @@ -0,0 +1,33 @@ +/// +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +import * as beetSolana from "@metaplex-foundation/beet-solana"; +export interface EntityArgs { + id: beet.bignum; +} +export declare const entityDiscriminator: number[]; +export declare class Entity implements EntityArgs { + readonly id: beet.bignum; + private constructor(); + static fromArgs(args: EntityArgs): Entity; + static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [Entity, number]; + static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; + static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ + id: any; + accountDiscriminator: any; + }>; + static deserialize(buf: Buffer, offset?: number): [Entity, number]; + serialize(): [Buffer, number]; + static get byteSize(): number; + static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; + static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; + pretty(): { + id: number | { + toNumber: () => number; + }; + }; +} +export declare const entityBeet: beet.BeetStruct; +//# sourceMappingURL=Entity.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map new file mode 100644 index 0000000..f153ac6 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,UAAuC,CAAC;AAQxE,qBAAa,MAAO,YAAW,UAAU;IACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM;IAA5C,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;IAQhC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,MAAM,EAAE,MAAM,CAAC;WAUN,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,MAAM,CAAC;IAiBlB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ7D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;CAYpD;AAMD,eAAO,MAAM,UAAU;0BAGG,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.js b/clients/bolt-sdk/lib/generated/accounts/Entity.js new file mode 100644 index 0000000..c100572 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Entity.js @@ -0,0 +1,158 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.entityBeet = exports.Entity = exports.entityDiscriminator = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); +exports.entityDiscriminator = [46, 157, 161, 161, 254, 46, 79, 24]; +var Entity = (function () { + function Entity(id) { + this.id = id; + } + Entity.fromArgs = function (args) { + return new Entity(args.id); + }; + Entity.fromAccountInfo = function (accountInfo, offset) { + if (offset === void 0) { offset = 0; } + return Entity.deserialize(accountInfo.data, offset); + }; + Entity.fromAccountAddress = function (connection, address, commitmentOrConfig) { + return __awaiter(this, void 0, void 0, function () { + var accountInfo; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; + case 1: + accountInfo = _a.sent(); + if (accountInfo == null) { + throw new Error("Unable to find Entity account at ".concat(address)); + } + return [2, Entity.fromAccountInfo(accountInfo, 0)[0]]; + } + }); + }); + }; + Entity.gpaBuilder = function (programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + return beetSolana.GpaBuilder.fromStruct(programId, exports.entityBeet); + }; + Entity.deserialize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return exports.entityBeet.deserialize(buf, offset); + }; + Entity.prototype.serialize = function () { + return exports.entityBeet.serialize(__assign({ accountDiscriminator: exports.entityDiscriminator }, this)); + }; + Object.defineProperty(Entity, "byteSize", { + get: function () { + return exports.entityBeet.byteSize; + }, + enumerable: false, + configurable: true + }); + Entity.getMinimumBalanceForRentExemption = function (connection, commitment) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, connection.getMinimumBalanceForRentExemption(Entity.byteSize, commitment)]; + }); + }); + }; + Entity.hasCorrectByteSize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return buf.byteLength - offset === Entity.byteSize; + }; + Entity.prototype.pretty = function () { + var _this = this; + return { + id: (function () { + var x = _this.id; + if (typeof x.toNumber === "function") { + try { + return x.toNumber(); + } + catch (_) { + return x; + } + } + return x; + })(), + }; + }; + return Entity; +}()); +exports.Entity = Entity; +exports.entityBeet = new beet.BeetStruct([ + ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["id", beet.u64], +], Entity.fromArgs, "Entity"); +//# sourceMappingURL=Entity.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.js.map b/clients/bolt-sdk/lib/generated/accounts/Entity.js.map new file mode 100644 index 0000000..f7a7a12 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Entity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAWlD,QAAA,mBAAmB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAQxE;IACE,gBAA6B,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;IAAG,CAAC;IAKzC,eAAQ,GAAf,UAAgB,IAAgB;QAC9B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAMM,sBAAe,GAAtB,UACE,WAAqC,EACrC,MAAU;QAAV,uBAAA,EAAA,UAAU;QAEV,OAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,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MD,uBAAM,GAAN;QAAA,iBAcC;QAbC,OAAO;YACL,EAAE,EAAE,CAAC;gBACH,IAAM,CAAC,GAAG,KAAI,CAAC,EAAgC,CAAC;gBAChD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,wBAAM;AAoIN,QAAA,UAAU,GAAG,IAAI,IAAI,CAAC,UAAU,CAM3C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;CACjB,EACD,MAAM,CAAC,QAAQ,EACf,QAAQ,CACT,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts new file mode 100644 index 0000000..7fe25a4 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts @@ -0,0 +1,33 @@ +/// +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +import * as beetSolana from "@metaplex-foundation/beet-solana"; +export interface RegistryArgs { + worlds: beet.bignum; +} +export declare const registryDiscriminator: number[]; +export declare class Registry implements RegistryArgs { + readonly worlds: beet.bignum; + private constructor(); + static fromArgs(args: RegistryArgs): Registry; + static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [Registry, number]; + static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; + static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ + accountDiscriminator: any; + worlds: any; + }>; + static deserialize(buf: Buffer, offset?: number): [Registry, number]; + serialize(): [Buffer, number]; + static get byteSize(): number; + static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; + static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; + pretty(): { + worlds: number | { + toNumber: () => number; + }; + }; +} +export declare const registryBeet: beet.BeetStruct; +//# sourceMappingURL=Registry.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map new file mode 100644 index 0000000..bebd9f9 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/Registry.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,UAA0C,CAAC;AAQ7E,qBAAa,QAAS,YAAW,YAAY;IACvB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM;IAAhD,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY;IAQlC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,QAAQ,EAAE,MAAM,CAAC;WAUR,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,QAAQ,CAAC;IAiBpB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;IAQ/D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGqC,MAAM,MAAM;;;CAYxD;AAMD,eAAO,MAAM,YAAY;0BAGC,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.js b/clients/bolt-sdk/lib/generated/accounts/Registry.js new file mode 100644 index 0000000..8f79e2d --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Registry.js @@ -0,0 +1,158 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.registryBeet = exports.Registry = exports.registryDiscriminator = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); +exports.registryDiscriminator = [47, 174, 110, 246, 184, 182, 252, 218]; +var Registry = (function () { + function Registry(worlds) { + this.worlds = worlds; + } + Registry.fromArgs = function (args) { + return new Registry(args.worlds); + }; + Registry.fromAccountInfo = function (accountInfo, offset) { + if (offset === void 0) { offset = 0; } + return Registry.deserialize(accountInfo.data, offset); + }; + Registry.fromAccountAddress = function (connection, address, commitmentOrConfig) { + return __awaiter(this, void 0, void 0, function () { + var accountInfo; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; + case 1: + accountInfo = _a.sent(); + if (accountInfo == null) { + throw new Error("Unable to find Registry account at ".concat(address)); + } + return [2, Registry.fromAccountInfo(accountInfo, 0)[0]]; + } + }); + }); + }; + Registry.gpaBuilder = function (programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + return beetSolana.GpaBuilder.fromStruct(programId, exports.registryBeet); + }; + Registry.deserialize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return exports.registryBeet.deserialize(buf, offset); + }; + Registry.prototype.serialize = function () { + return exports.registryBeet.serialize(__assign({ accountDiscriminator: exports.registryDiscriminator }, this)); + }; + Object.defineProperty(Registry, "byteSize", { + get: function () { + return exports.registryBeet.byteSize; + }, + enumerable: false, + configurable: true + }); + Registry.getMinimumBalanceForRentExemption = function (connection, commitment) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, connection.getMinimumBalanceForRentExemption(Registry.byteSize, commitment)]; + }); + }); + }; + Registry.hasCorrectByteSize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return buf.byteLength - offset === Registry.byteSize; + }; + Registry.prototype.pretty = function () { + var _this = this; + return { + worlds: (function () { + var x = _this.worlds; + if (typeof x.toNumber === "function") { + try { + return x.toNumber(); + } + catch (_) { + return x; + } + } + return x; + })(), + }; + }; + return Registry; +}()); +exports.Registry = Registry; +exports.registryBeet = new beet.BeetStruct([ + ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["worlds", beet.u64], +], Registry.fromArgs, "Registry"); +//# sourceMappingURL=Registry.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.js.map b/clients/bolt-sdk/lib/generated/accounts/Registry.js.map new file mode 100644 index 0000000..eb8915a --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/Registry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Registry.js","sourceRoot":"","sources":["../../../src/generated/accounts/Registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAWlD,QAAA,qBAAqB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAQ7E;IACE,kBAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAK7C,iBAAQ,GAAf,UAAgB,IAAkB;QAChC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAMM,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0B,GAAW,EAAE,MAAU;QAAV,uBAAA,EAAA,UAAU;QAC/C,OAAO,GAAG,CAAC,UAAU,GAAG,MAAM,KAAK,QAAQ,CAAC,QAAQ,CAAC;IACvD,CAAC;IAMD,yBAAM,GAAN;QAAA,iBAcC;QAbC,OAAO;YACL,MAAM,EAAE,CAAC;gBACP,IAAM,CAAC,GAAG,KAAI,CAAC,MAAoC,CAAC;gBACpD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,eAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,4BAAQ;AAoIR,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,UAAU,CAM7C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC;CACrB,EACD,QAAQ,CAAC,QAAQ,EACjB,UAAU,CACX,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.d.ts b/clients/bolt-sdk/lib/generated/accounts/World.d.ts new file mode 100644 index 0000000..4d0c2e2 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/World.d.ts @@ -0,0 +1,39 @@ +/// +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +import * as beetSolana from "@metaplex-foundation/beet-solana"; +export interface WorldArgs { + id: beet.bignum; + entities: beet.bignum; +} +export declare const worldDiscriminator: number[]; +export declare class World implements WorldArgs { + readonly id: beet.bignum; + readonly entities: beet.bignum; + private constructor(); + static fromArgs(args: WorldArgs): World; + static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [World, number]; + static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; + static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ + id: any; + accountDiscriminator: any; + entities: any; + }>; + static deserialize(buf: Buffer, offset?: number): [World, number]; + serialize(): [Buffer, number]; + static get byteSize(): number; + static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; + static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; + pretty(): { + id: number | { + toNumber: () => number; + }; + entities: number | { + toNumber: () => number; + }; + }; +} +export declare const worldBeet: beet.BeetStruct; +//# sourceMappingURL=World.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map new file mode 100644 index 0000000..d83695c --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"World.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/World.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,UAAyC,CAAC;AAQzE,qBAAa,KAAM,YAAW,SAAS;IAEnC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM;IACxB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM;IAFhC,OAAO;IAQP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS;IAQ/B,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,KAAK,EAAE,MAAM,CAAC;WAUL,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,KAAK,CAAC;IAiBjB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;IAQ5D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;sBAWN,MAAM,MAAM;;;CAY1D;AAMD,eAAO,MAAM,SAAS;0BAGI,MAAM,EAAE;EAUjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.js b/clients/bolt-sdk/lib/generated/accounts/World.js new file mode 100644 index 0000000..4b6afd0 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/World.js @@ -0,0 +1,172 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.worldBeet = exports.World = exports.worldDiscriminator = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); +exports.worldDiscriminator = [145, 45, 170, 174, 122, 32, 155, 124]; +var World = (function () { + function World(id, entities) { + this.id = id; + this.entities = entities; + } + World.fromArgs = function (args) { + return new World(args.id, args.entities); + }; + World.fromAccountInfo = function (accountInfo, offset) { + if (offset === void 0) { offset = 0; } + return World.deserialize(accountInfo.data, offset); + }; + World.fromAccountAddress = function (connection, address, commitmentOrConfig) { + return __awaiter(this, void 0, void 0, function () { + var accountInfo; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; + case 1: + accountInfo = _a.sent(); + if (accountInfo == null) { + throw new Error("Unable to find World account at ".concat(address)); + } + return [2, World.fromAccountInfo(accountInfo, 0)[0]]; + } + }); + }); + }; + World.gpaBuilder = function (programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + return beetSolana.GpaBuilder.fromStruct(programId, exports.worldBeet); + }; + World.deserialize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return exports.worldBeet.deserialize(buf, offset); + }; + World.prototype.serialize = function () { + return exports.worldBeet.serialize(__assign({ accountDiscriminator: exports.worldDiscriminator }, this)); + }; + Object.defineProperty(World, "byteSize", { + get: function () { + return exports.worldBeet.byteSize; + }, + enumerable: false, + configurable: true + }); + World.getMinimumBalanceForRentExemption = function (connection, commitment) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, connection.getMinimumBalanceForRentExemption(World.byteSize, commitment)]; + }); + }); + }; + World.hasCorrectByteSize = function (buf, offset) { + if (offset === void 0) { offset = 0; } + return buf.byteLength - offset === World.byteSize; + }; + World.prototype.pretty = function () { + var _this = this; + return { + id: (function () { + var x = _this.id; + if (typeof x.toNumber === "function") { + try { + return x.toNumber(); + } + catch (_) { + return x; + } + } + return x; + })(), + entities: (function () { + var x = _this.entities; + if (typeof x.toNumber === "function") { + try { + return x.toNumber(); + } + catch (_) { + return x; + } + } + return x; + })(), + }; + }; + return World; +}()); +exports.World = World; +exports.worldBeet = new beet.BeetStruct([ + ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["id", beet.u64], + ["entities", beet.u64], +], World.fromArgs, "World"); +//# sourceMappingURL=World.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.js.map b/clients/bolt-sdk/lib/generated/accounts/World.js.map new file mode 100644 index 0000000..8df46fa --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/World.js.map @@ -0,0 +1 @@ +{"version":3,"file":"World.js","sourceRoot":"","sources":["../../../src/generated/accounts/World.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAYlD,QAAA,kBAAkB,GAAG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AAG,IAAI,IAAI,CAAC,UAAU,CAM1C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;IAChB,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC;CACvB,EACD,KAAK,CAAC,QAAQ,EACd,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/accounts/index.d.ts b/clients/bolt-sdk/lib/generated/accounts/index.d.ts similarity index 66% rename from clients/bolt-sdk/lib/accounts/index.d.ts rename to clients/bolt-sdk/lib/generated/accounts/index.d.ts index a5ea994..3bc3fe7 100644 --- a/clients/bolt-sdk/lib/accounts/index.d.ts +++ b/clients/bolt-sdk/lib/generated/accounts/index.d.ts @@ -5,8 +5,8 @@ export * from "./Entity"; export * from "./Registry"; export * from "./World"; export declare const accountProviders: { - Entity: typeof Entity; - Registry: typeof Registry; - World: typeof World; + Entity: typeof Entity; + Registry: typeof Registry; + World: typeof World; }; -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map new file mode 100644 index 0000000..18c003d --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;CAA8B,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.js b/clients/bolt-sdk/lib/generated/accounts/index.js new file mode 100644 index 0000000..8ba05cd --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.accountProviders = void 0; +var Entity_1 = require("./Entity"); +var Registry_1 = require("./Registry"); +var World_1 = require("./World"); +__exportStar(require("./Entity"), exports); +__exportStar(require("./Registry"), exports); +__exportStar(require("./World"), exports); +exports.accountProviders = { Entity: Entity_1.Entity, Registry: Registry_1.Registry, World: World_1.World }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.js.map b/clients/bolt-sdk/lib/generated/accounts/index.js.map new file mode 100644 index 0000000..879d1a1 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/accounts/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,mCAAkC;AAClC,uCAAsC;AACtC,iCAAgC;AAEhC,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AAEX,QAAA,gBAAgB,GAAG,EAAE,MAAM,iBAAA,EAAE,QAAQ,qBAAA,EAAE,KAAK,eAAA,EAAE,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/errors/index.d.ts b/clients/bolt-sdk/lib/generated/errors/index.d.ts similarity index 71% rename from clients/bolt-sdk/lib/errors/index.d.ts rename to clients/bolt-sdk/lib/generated/errors/index.d.ts index f8c3dba..91a124f 100644 --- a/clients/bolt-sdk/lib/errors/index.d.ts +++ b/clients/bolt-sdk/lib/generated/errors/index.d.ts @@ -1,13 +1,13 @@ type ErrorWithCode = Error & { - code: number; + code: number; }; type MaybeErrorWithCode = ErrorWithCode | null | undefined; export declare class InvalidAuthorityError extends Error { - readonly code: number; - readonly name: string; - constructor(); + readonly code: number; + readonly name: string; + constructor(); } export declare function errorFromCode(code: number): MaybeErrorWithCode; export declare function errorFromName(name: string): MaybeErrorWithCode; export {}; -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.d.ts.map b/clients/bolt-sdk/lib/generated/errors/index.d.ts.map new file mode 100644 index 0000000..62d7a04 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/errors/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9C,KAAK,kBAAkB,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;AAW3D,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAsB;;CAO5C;AAaD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D;AAOD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.js b/clients/bolt-sdk/lib/generated/errors/index.js new file mode 100644 index 0000000..8c3dcce --- /dev/null +++ b/clients/bolt-sdk/lib/generated/errors/index.js @@ -0,0 +1,47 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.errorFromName = exports.errorFromCode = exports.InvalidAuthorityError = void 0; +var createErrorFromCodeLookup = new Map(); +var createErrorFromNameLookup = new Map(); +var InvalidAuthorityError = (function (_super) { + __extends(InvalidAuthorityError, _super); + function InvalidAuthorityError() { + var _this = _super.call(this, "Invalid authority for instruction") || this; + _this.code = 0x1770; + _this.name = "InvalidAuthority"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(_this, InvalidAuthorityError); + } + return _this; + } + return InvalidAuthorityError; +}(Error)); +exports.InvalidAuthorityError = InvalidAuthorityError; +createErrorFromCodeLookup.set(0x1770, function () { return new InvalidAuthorityError(); }); +createErrorFromNameLookup.set("InvalidAuthority", function () { return new InvalidAuthorityError(); }); +function errorFromCode(code) { + var createError = createErrorFromCodeLookup.get(code); + return createError != null ? createError() : null; +} +exports.errorFromCode = errorFromCode; +function errorFromName(name) { + var createError = createErrorFromNameLookup.get(name); + return createError != null ? createError() : null; +} +exports.errorFromName = errorFromName; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.js.map b/clients/bolt-sdk/lib/generated/errors/index.js.map new file mode 100644 index 0000000..d8d57d2 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/errors/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUA,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AACzE,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AAQzE;IAA2C,yCAAK;IAG9C;QAAA,YACE,kBAAM,mCAAmC,CAAC,SAI3C;QAPQ,UAAI,GAAW,MAAM,CAAC;QACtB,UAAI,GAAW,kBAAkB,CAAC;QAGzC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,UAAU,EAAE;YACjD,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,qBAAqB,CAAC,CAAC;SACtD;;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AATD,CAA2C,KAAK,GAS/C;AATY,sDAAqB;AAWlC,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAAC,CAAC;AACzE,yBAAyB,CAAC,GAAG,CAC3B,kBAAkB,EAClB,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAClC,CAAC;AAOF,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC;AAOD,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.d.ts b/clients/bolt-sdk/lib/generated/index.d.ts new file mode 100644 index 0000000..5cdd83b --- /dev/null +++ b/clients/bolt-sdk/lib/generated/index.d.ts @@ -0,0 +1,7 @@ +import { PublicKey } from "@solana/web3.js"; +export * from "./accounts"; +export * from "./errors"; +export * from "./instructions"; +export declare const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; +export declare const PROGRAM_ID: PublicKey; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.d.ts.map b/clients/bolt-sdk/lib/generated/index.d.ts.map new file mode 100644 index 0000000..d2ca8ae --- /dev/null +++ b/clients/bolt-sdk/lib/generated/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAQ/B,eAAO,MAAM,eAAe,gDAAgD,CAAC;AAQ7E,eAAO,MAAM,UAAU,WAAiC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.js b/clients/bolt-sdk/lib/generated/index.js new file mode 100644 index 0000000..d664ce7 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/index.js @@ -0,0 +1,24 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PROGRAM_ID = exports.PROGRAM_ADDRESS = void 0; +var web3_js_1 = require("@solana/web3.js"); +__exportStar(require("./accounts"), exports); +__exportStar(require("./errors"), exports); +__exportStar(require("./instructions"), exports); +exports.PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; +exports.PROGRAM_ID = new web3_js_1.PublicKey(exports.PROGRAM_ADDRESS); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.js.map b/clients/bolt-sdk/lib/generated/index.js.map new file mode 100644 index 0000000..09ef7e5 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,2CAA4C;AAC5C,6CAA2B;AAC3B,2CAAyB;AACzB,iDAA+B;AAQlB,QAAA,eAAe,GAAG,6CAA6C,CAAC;AAQhE,QAAA,UAAU,GAAG,IAAI,mBAAS,CAAC,uBAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts new file mode 100644 index 0000000..f52b6b6 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts @@ -0,0 +1,18 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface AddEntityInstructionArgs { + extraSeed: beet.COption; +} +export declare const addEntityStruct: beet.FixableBeetArgsStruct; +export interface AddEntityInstructionAccounts { + payer: web3.PublicKey; + entity: web3.PublicKey; + world: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const addEntityInstructionDiscriminator: number[]; +export declare function createAddEntityInstruction(accounts: AddEntityInstructionAccounts, args: AddEntityInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=addEntity.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map new file mode 100644 index 0000000..a47ff1a --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"addEntity.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC;AAMD,eAAO,MAAM,eAAe;8BAEE,MAAM,EAAE;EAQrC,CAAC;AAWF,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,iCAAiC,UAE7C,CAAC;AAYF,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,4BAA4B,EACtC,IAAI,EAAE,wBAAwB,EAC9B,SAAS,iBAAoE,+BAyC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.js b/clients/bolt-sdk/lib/generated/instructions/addEntity.js new file mode 100644 index 0000000..c57e095 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/addEntity.js @@ -0,0 +1,87 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createAddEntityInstruction = exports.addEntityInstructionDiscriminator = exports.addEntityStruct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.addEntityStruct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["extraSeed", beet.coption(beet.utf8String)], +], "AddEntityInstructionArgs"); +exports.addEntityInstructionDiscriminator = [ + 163, 241, 57, 35, 244, 244, 48, 57, +]; +function createAddEntityInstruction(accounts, args, programId) { + var _a; + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.addEntityStruct.serialize(__assign({ instructionDiscriminator: exports.addEntityInstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.payer, + isWritable: true, + isSigner: true, + }, + { + pubkey: accounts.entity, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.world, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { + var acc = _b[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createAddEntityInstruction = createAddEntityInstruction; +//# sourceMappingURL=addEntity.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map b/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map new file mode 100644 index 0000000..12ca8ea --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"addEntity.js","sourceRoot":"","sources":["../../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,eAAe,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAK3D;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;CAC7C,EACD,0BAA0B,CAC3B,CAAC;AAmBW,QAAA,iCAAiC,GAAG;IAC/C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CACnC,CAAC;AAYF,SAAgB,0BAA0B,CACxC,QAAsC,EACtC,IAA8B,EAC9B,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,uBAAe,CAAC,SAAS,YACtC,wBAAwB,EAAE,yCAAiC,IACxD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA5CD,gEA4CC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts new file mode 100644 index 0000000..c6bfd94 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts @@ -0,0 +1,19 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface ApplyInstructionArgs { + args: Uint8Array; +} +export declare const applyStruct: beet.FixableBeetArgsStruct; +export interface ApplyInstructionAccounts { + componentProgram: web3.PublicKey; + boltSystem: web3.PublicKey; + boltComponent: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const applyInstructionDiscriminator: number[]; +export declare function createApplyInstruction(accounts: ApplyInstructionAccounts, args: ApplyInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=apply.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map new file mode 100644 index 0000000..55a04cb --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,WAAW;8BAEM,MAAM,EAAE;EAQrC,CAAC;AAaF,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,6BAA6B,UAEzC,CAAC;AAYF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,oBAAoB,EAC1B,SAAS,iBAAoE,+BA8C9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.js b/clients/bolt-sdk/lib/generated/instructions/apply.js new file mode 100644 index 0000000..b881cda --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply.js @@ -0,0 +1,91 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createApplyInstruction = exports.applyInstructionDiscriminator = exports.applyStruct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.applyStruct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["args", beet.bytes], +], "ApplyInstructionArgs"); +exports.applyInstructionDiscriminator = [ + 248, 243, 145, 24, 105, 50, 162, 225, +]; +function createApplyInstruction(accounts, args, programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.applyStruct.serialize(__assign({ instructionDiscriminator: exports.applyInstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.componentProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltSystem, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { + var acc = _a[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createApplyInstruction = createApplyInstruction; +//# sourceMappingURL=apply.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.js.map b/clients/bolt-sdk/lib/generated/instructions/apply.js.map new file mode 100644 index 0000000..9125d9b --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,WAAW,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKvD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,sBAAsB,CACvB,CAAC;AAsBW,QAAA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AAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAjDD,wDAiDC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts new file mode 100644 index 0000000..a8545d6 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts @@ -0,0 +1,21 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface Apply2InstructionArgs { + args: Uint8Array; +} +export declare const apply2Struct: beet.FixableBeetArgsStruct; +export interface Apply2InstructionAccounts { + boltSystem: web3.PublicKey; + componentProgram1: web3.PublicKey; + boltComponent1: web3.PublicKey; + componentProgram2: web3.PublicKey; + boltComponent2: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const apply2InstructionDiscriminator: number[]; +export declare function createApply2Instruction(accounts: Apply2InstructionAccounts, args: Apply2InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=apply2.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map new file mode 100644 index 0000000..2acce74 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply2.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply2.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAeF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAwD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.js b/clients/bolt-sdk/lib/generated/instructions/apply2.js new file mode 100644 index 0000000..1620a43 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply2.js @@ -0,0 +1,101 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createApply2Instruction = exports.apply2InstructionDiscriminator = exports.apply2Struct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.apply2Struct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["args", beet.bytes], +], "Apply2InstructionArgs"); +exports.apply2InstructionDiscriminator = [ + 120, 32, 116, 154, 158, 159, 208, 73, +]; +function createApply2Instruction(accounts, args, programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.apply2Struct.serialize(__assign({ instructionDiscriminator: exports.apply2InstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.boltSystem, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.componentProgram1, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent1, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram2, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent2, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { + var acc = _a[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createApply2Instruction = createApply2Instruction; +//# sourceMappingURL=apply2.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.js.map b/clients/bolt-sdk/lib/generated/instructions/apply2.js.map new file mode 100644 index 0000000..a84e6d5 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply2.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AA0BW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CACrC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,oBAAY,CAAC,SAAS,YACnC,wBAAwB,EAAE,sCAA8B,IACrD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA3DD,0DA2DC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts new file mode 100644 index 0000000..3d2d748 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts @@ -0,0 +1,23 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface Apply3InstructionArgs { + args: Uint8Array; +} +export declare const apply3Struct: beet.FixableBeetArgsStruct; +export interface Apply3InstructionAccounts { + boltSystem: web3.PublicKey; + componentProgram1: web3.PublicKey; + boltComponent1: web3.PublicKey; + componentProgram2: web3.PublicKey; + boltComponent2: web3.PublicKey; + componentProgram3: web3.PublicKey; + boltComponent3: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const apply3InstructionDiscriminator: number[]; +export declare function createApply3Instruction(accounts: Apply3InstructionAccounts, args: Apply3InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=apply3.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map new file mode 100644 index 0000000..f1414ed --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply3.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply3.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAiBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAkE9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.js b/clients/bolt-sdk/lib/generated/instructions/apply3.js new file mode 100644 index 0000000..6ced1f9 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply3.js @@ -0,0 +1,111 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createApply3Instruction = exports.apply3InstructionDiscriminator = exports.apply3Struct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.apply3Struct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["args", beet.bytes], +], "Apply3InstructionArgs"); +exports.apply3InstructionDiscriminator = [ + 254, 146, 49, 7, 236, 131, 105, 221, +]; +function createApply3Instruction(accounts, args, programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.apply3Struct.serialize(__assign({ instructionDiscriminator: exports.apply3InstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.boltSystem, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.componentProgram1, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent1, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram2, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent2, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram3, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent3, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { + var acc = _a[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createApply3Instruction = createApply3Instruction; +//# sourceMappingURL=apply3.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.js.map b/clients/bolt-sdk/lib/generated/instructions/apply3.js.map new file mode 100644 index 0000000..6360b43 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply3.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply3.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE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,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AArED,0DAqEC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts new file mode 100644 index 0000000..c1c59a7 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts @@ -0,0 +1,25 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface Apply4InstructionArgs { + args: Uint8Array; +} +export declare const apply4Struct: beet.FixableBeetArgsStruct; +export interface Apply4InstructionAccounts { + boltSystem: web3.PublicKey; + componentProgram1: web3.PublicKey; + boltComponent1: web3.PublicKey; + componentProgram2: web3.PublicKey; + boltComponent2: web3.PublicKey; + componentProgram3: web3.PublicKey; + boltComponent3: web3.PublicKey; + componentProgram4: web3.PublicKey; + boltComponent4: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const apply4InstructionDiscriminator: number[]; +export declare function createApply4Instruction(accounts: Apply4InstructionAccounts, args: Apply4InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=apply4.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map new file mode 100644 index 0000000..7034f50 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply4.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply4.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAmBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BA4E9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.js b/clients/bolt-sdk/lib/generated/instructions/apply4.js new file mode 100644 index 0000000..55f0914 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply4.js @@ -0,0 +1,121 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createApply4Instruction = exports.apply4InstructionDiscriminator = exports.apply4Struct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.apply4Struct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["args", beet.bytes], +], "Apply4InstructionArgs"); +exports.apply4InstructionDiscriminator = [ + 223, 104, 24, 79, 252, 196, 14, 109, +]; +function createApply4Instruction(accounts, args, programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.apply4Struct.serialize(__assign({ instructionDiscriminator: exports.apply4InstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.boltSystem, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.componentProgram1, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent1, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram2, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent2, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram3, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent3, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram4, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent4, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { + var acc = _a[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createApply4Instruction = createApply4Instruction; +//# sourceMappingURL=apply4.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.js.map b/clients/bolt-sdk/lib/generated/instructions/apply4.js.map new file mode 100644 index 0000000..e92a4d0 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply4.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply4.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA/ED,0DA+EC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts new file mode 100644 index 0000000..4914cb7 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts @@ -0,0 +1,27 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export interface Apply5InstructionArgs { + args: Uint8Array; +} +export declare const apply5Struct: beet.FixableBeetArgsStruct; +export interface Apply5InstructionAccounts { + boltSystem: web3.PublicKey; + componentProgram1: web3.PublicKey; + boltComponent1: web3.PublicKey; + componentProgram2: web3.PublicKey; + boltComponent2: web3.PublicKey; + componentProgram3: web3.PublicKey; + boltComponent3: web3.PublicKey; + componentProgram4: web3.PublicKey; + boltComponent4: web3.PublicKey; + componentProgram5: web3.PublicKey; + boltComponent5: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const apply5InstructionDiscriminator: number[]; +export declare function createApply5Instruction(accounts: Apply5InstructionAccounts, args: Apply5InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=apply5.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map new file mode 100644 index 0000000..ca04e89 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply5.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply5.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAqBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAsF9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.js b/clients/bolt-sdk/lib/generated/instructions/apply5.js new file mode 100644 index 0000000..c94da90 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply5.js @@ -0,0 +1,131 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createApply5Instruction = exports.apply5InstructionDiscriminator = exports.apply5Struct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.apply5Struct = new beet.FixableBeetArgsStruct([ + ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], + ["args", beet.bytes], +], "Apply5InstructionArgs"); +exports.apply5InstructionDiscriminator = [ + 70, 164, 214, 28, 136, 116, 84, 153, +]; +function createApply5Instruction(accounts, args, programId) { + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.apply5Struct.serialize(__assign({ instructionDiscriminator: exports.apply5InstructionDiscriminator }, args))[0]; + var keys = [ + { + pubkey: accounts.boltSystem, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.componentProgram1, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent1, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram2, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent2, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram3, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent3, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram4, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent4, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.componentProgram5, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.boltComponent5, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { + var acc = _a[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createApply5Instruction = createApply5Instruction; +//# sourceMappingURL=apply5.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.js.map b/clients/bolt-sdk/lib/generated/instructions/apply5.js.map new file mode 100644 index 0000000..9fddeab --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/apply5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply5.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply5.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AAsCW,QAAA,8BAA8B,GAAG;IAC5C,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CACpC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,oBAAY,CAAC,SAAS,YACnC,wBAAwB,EAAE,sCAA8B,IACrD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU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IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAzFD,0DAyFC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/index.d.ts b/clients/bolt-sdk/lib/generated/instructions/index.d.ts similarity index 88% rename from clients/bolt-sdk/lib/instructions/index.d.ts rename to clients/bolt-sdk/lib/generated/instructions/index.d.ts index 50dada2..ceb5fb7 100644 --- a/clients/bolt-sdk/lib/instructions/index.d.ts +++ b/clients/bolt-sdk/lib/generated/instructions/index.d.ts @@ -7,4 +7,4 @@ export * from "./apply5"; export * from "./initializeComponent"; export * from "./initializeNewWorld"; export * from "./initializeRegistry"; -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map new file mode 100644 index 0000000..a24ceda --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.js b/clients/bolt-sdk/lib/generated/instructions/index.js new file mode 100644 index 0000000..3228894 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/index.js @@ -0,0 +1,26 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./addEntity"), exports); +__exportStar(require("./apply"), exports); +__exportStar(require("./apply2"), exports); +__exportStar(require("./apply3"), exports); +__exportStar(require("./apply4"), exports); +__exportStar(require("./apply5"), exports); +__exportStar(require("./initializeComponent"), exports); +__exportStar(require("./initializeNewWorld"), exports); +__exportStar(require("./initializeRegistry"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.js.map b/clients/bolt-sdk/lib/generated/instructions/index.js.map new file mode 100644 index 0000000..939c311 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/instructions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts new file mode 100644 index 0000000..dac15ba --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts @@ -0,0 +1,18 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export declare const initializeComponentStruct: beet.BeetArgsStruct<{ + instructionDiscriminator: number[]; +}>; +export interface InitializeComponentInstructionAccounts { + payer: web3.PublicKey; + data: web3.PublicKey; + entity: web3.PublicKey; + componentProgram: web3.PublicKey; + authority: web3.PublicKey; + instructionSysvarAccount: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const initializeComponentInstructionDiscriminator: number[]; +export declare function createInitializeComponentInstruction(accounts: InitializeComponentInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=initializeComponent.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map new file mode 100644 index 0000000..b6468d5 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeComponent.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,yBAAyB;8BACV,MAAM,EAAE;EAInC,CAAC;AAcF,MAAM,WAAW,sCAAsC;IACrD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,2CAA2C,UAEvD,CAAC;AAUF,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,sCAAsC,EAChD,SAAS,iBAAoE,+BAuD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js new file mode 100644 index 0000000..b0c862b --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js @@ -0,0 +1,90 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInitializeComponentInstruction = exports.initializeComponentInstructionDiscriminator = exports.initializeComponentStruct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.initializeComponentStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeComponentInstructionArgs"); +exports.initializeComponentInstructionDiscriminator = [ + 36, 143, 233, 113, 12, 234, 61, 30, +]; +function createInitializeComponentInstruction(accounts, programId) { + var _a; + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.initializeComponentStruct.serialize({ + instructionDiscriminator: exports.initializeComponentInstructionDiscriminator, + })[0]; + var keys = [ + { + pubkey: accounts.payer, + isWritable: true, + isSigner: true, + }, + { + pubkey: accounts.data, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.entity, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.componentProgram, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.authority, + isWritable: false, + isSigner: false, + }, + { + pubkey: accounts.instructionSysvarAccount, + isWritable: false, + isSigner: false, + }, + { + pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { + var acc = _b[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createInitializeComponentInstruction = createInitializeComponentInstruction; +//# sourceMappingURL=initializeComponent.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map new file mode 100644 index 0000000..ba5ecc4 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeComponent.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QA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,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAzDD,oFAyDC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts new file mode 100644 index 0000000..4f119ac --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts @@ -0,0 +1,15 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export declare const initializeNewWorldStruct: beet.BeetArgsStruct<{ + instructionDiscriminator: number[]; +}>; +export interface InitializeNewWorldInstructionAccounts { + payer: web3.PublicKey; + world: web3.PublicKey; + registry: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const initializeNewWorldInstructionDiscriminator: number[]; +export declare function createInitializeNewWorldInstruction(accounts: InitializeNewWorldInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=initializeNewWorld.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map new file mode 100644 index 0000000..97e6a4f --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeNewWorld.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAWF,MAAM,WAAW,qCAAqC;IACpD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAwC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js new file mode 100644 index 0000000..3426afc --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js @@ -0,0 +1,75 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInitializeNewWorldInstruction = exports.initializeNewWorldInstructionDiscriminator = exports.initializeNewWorldStruct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.initializeNewWorldStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeNewWorldInstructionArgs"); +exports.initializeNewWorldInstructionDiscriminator = [ + 23, 96, 88, 194, 200, 203, 200, 98, +]; +function createInitializeNewWorldInstruction(accounts, programId) { + var _a; + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.initializeNewWorldStruct.serialize({ + instructionDiscriminator: exports.initializeNewWorldInstructionDiscriminator, + })[0]; + var keys = [ + { + pubkey: accounts.payer, + isWritable: true, + isSigner: true, + }, + { + pubkey: accounts.world, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.registry, + isWritable: true, + isSigner: false, + }, + { + pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { + var acc = _b[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createInitializeNewWorldInstruction = createInitializeNewWorldInstruction; +//# sourceMappingURL=initializeNewWorld.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map new file mode 100644 index 0000000..92a0c10 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeNewWorld.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QAAA,wBAAwB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG7D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,mCAAmC,CACpC,CAAC;AAmBW,QAAA,0CAA0C,GAAG;IACxD,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CACnC,CAAC;AAUF,SAAgB,mCAAmC,CACjD,QAA+C,EAC/C,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,gCAAwB,CAAC,SAAS,CAAC;QAChD,wBAAwB,EAAE,kDAA0C;KACrE,CAAC,GAFS,CAER;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,QAAQ;YACzB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA1CD,kFA0CC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts new file mode 100644 index 0000000..93b9ea0 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts @@ -0,0 +1,14 @@ +import * as beet from "@metaplex-foundation/beet"; +import * as web3 from "@solana/web3.js"; +export declare const initializeRegistryStruct: beet.BeetArgsStruct<{ + instructionDiscriminator: number[]; +}>; +export interface InitializeRegistryInstructionAccounts { + registry: web3.PublicKey; + payer: web3.PublicKey; + systemProgram?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +} +export declare const initializeRegistryInstructionDiscriminator: number[]; +export declare function createInitializeRegistryInstruction(accounts: InitializeRegistryInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; +//# sourceMappingURL=initializeRegistry.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map new file mode 100644 index 0000000..a22ea39 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeRegistry.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAUF,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAmC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js new file mode 100644 index 0000000..48e8009 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js @@ -0,0 +1,70 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInitializeRegistryInstruction = exports.initializeRegistryInstructionDiscriminator = exports.initializeRegistryStruct = void 0; +var beet = __importStar(require("@metaplex-foundation/beet")); +var web3 = __importStar(require("@solana/web3.js")); +exports.initializeRegistryStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeRegistryInstructionArgs"); +exports.initializeRegistryInstructionDiscriminator = [ + 189, 181, 20, 17, 174, 57, 249, 59, +]; +function createInitializeRegistryInstruction(accounts, programId) { + var _a; + if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } + var data = exports.initializeRegistryStruct.serialize({ + instructionDiscriminator: exports.initializeRegistryInstructionDiscriminator, + })[0]; + var keys = [ + { + pubkey: accounts.registry, + isWritable: true, + isSigner: false, + }, + { + pubkey: accounts.payer, + isWritable: true, + isSigner: true, + }, + { + pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + ]; + if (accounts.anchorRemainingAccounts != null) { + for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { + var acc = _b[_i]; + keys.push(acc); + } + } + var ix = new web3.TransactionInstruction({ + programId: programId, + keys: keys, + data: data, + }); + return ix; +} +exports.createInitializeRegistryInstruction = createInitializeRegistryInstruction; +//# sourceMappingURL=initializeRegistry.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map new file mode 100644 index 0000000..69cf632 --- /dev/null +++ b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeRegistry.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AArCD,kFAqCC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts index 67c2c73..4631ac4 100644 --- a/clients/bolt-sdk/lib/index.d.ts +++ b/clients/bolt-sdk/lib/index.d.ts @@ -1,30 +1,15 @@ /// import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; -export * from "./accounts"; -export * from "./instructions"; -export * from "./transactions/transactions"; +export * from "./generated/accounts"; +export * from "./generated/instructions"; +export * from "./world/transactions"; export * from "./delegation/accounts"; export * from "./delegation/delegate"; -export declare const PROGRAM_ADDRESS = - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; export declare const SYSVAR_INSTRUCTIONS_PUBKEY: PublicKey; -export declare const PROGRAM_ID: PublicKey; export declare function FindWorldRegistryPda(programId?: PublicKey): PublicKey; -export declare function FindWorldPda( - id: BN | string | number | Uint8Array, - programId?: PublicKey -): PublicKey; -export declare function FindEntityPda( - worldId: BN | string | number | Uint8Array, - entityId: BN | string | number | Uint8Array, - extraSeed?: string, - programId?: PublicKey -): PublicKey; -export declare function FindComponentPda( - componentProgramId: PublicKey, - entity: PublicKey, - componentId?: string -): PublicKey; +export declare function FindWorldPda(id: BN | string | number | Uint8Array, programId?: PublicKey): PublicKey; +export declare function FindEntityPda(worldId: BN | string | number | Uint8Array, entityId: BN | string | number | Uint8Array, extraSeed?: string, programId?: PublicKey): PublicKey; +export declare function FindComponentPda(componentProgramId: PublicKey, entity: PublicKey, componentId?: string): PublicKey; export declare function SerializeArgs(args?: any): Buffer; -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.d.ts.map b/clients/bolt-sdk/lib/index.d.ts.map index 1627e50..7f0f920 100644 --- a/clients/bolt-sdk/lib/index.d.ts.map +++ b/clients/bolt-sdk/lib/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/generated/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAQtC,eAAO,MAAM,eAAe,gDAAgD,CAAC;AAE7E,eAAO,MAAM,0BAA0B,WAEtC,CAAC;AAQF,eAAO,MAAM,UAAU,WAAiC,CAAC;AAEzD,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,SAAqC,aAMjD;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EACrC,SAAS,GAAE,SAAqC,aAQjD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC1C,QAAQ,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC3C,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,GAAE,SAAqC,aAcjD;AAED,wBAAgB,gBAAgB,CAC9B,kBAAkB,EAAE,SAAS,EAC7B,MAAM,EAAE,SAAS,EACjB,WAAW,GAAE,MAAW,aAMzB;AAcD,wBAAgB,aAAa,CAAC,IAAI,GAAE,GAAQ,UAS3C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,0BAA0B,WAEtC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,SAAqC,aAMjD;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EACrC,SAAS,GAAE,SAAqC,aAQjD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC1C,QAAQ,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC3C,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,GAAE,SAAqC,aAcjD;AAED,wBAAgB,gBAAgB,CAC9B,kBAAkB,EAAE,SAAS,EAC7B,MAAM,EAAE,SAAS,EACjB,WAAW,GAAE,MAAW,aAMzB;AAcD,wBAAgB,aAAa,CAAC,IAAI,GAAE,GAAQ,UAS3C"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.js b/clients/bolt-sdk/lib/index.js index 98e1cea..20c33b7 100644 --- a/clients/bolt-sdk/lib/index.js +++ b/clients/bolt-sdk/lib/index.js @@ -1,129 +1,78 @@ "use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SerializeArgs = - exports.FindComponentPda = - exports.FindEntityPda = - exports.FindWorldPda = - exports.FindWorldRegistryPda = - exports.PROGRAM_ID = - exports.SYSVAR_INSTRUCTIONS_PUBKEY = - exports.PROGRAM_ADDRESS = - void 0; +exports.SerializeArgs = exports.FindComponentPda = exports.FindEntityPda = exports.FindWorldPda = exports.FindWorldRegistryPda = exports.SYSVAR_INSTRUCTIONS_PUBKEY = void 0; var web3_js_1 = require("@solana/web3.js"); var bn_js_1 = __importDefault(require("bn.js")); -__exportStar(require("./accounts"), exports); -__exportStar(require("./instructions"), exports); -__exportStar(require("./transactions/transactions"), exports); +var generated_1 = require("generated"); +__exportStar(require("./generated/accounts"), exports); +__exportStar(require("./generated/instructions"), exports); +__exportStar(require("./world/transactions"), exports); __exportStar(require("./delegation/accounts"), exports); __exportStar(require("./delegation/delegate"), exports); -exports.PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; -exports.SYSVAR_INSTRUCTIONS_PUBKEY = new web3_js_1.PublicKey( - "Sysvar1nstructions1111111111111111111111111" -); -exports.PROGRAM_ID = new web3_js_1.PublicKey(exports.PROGRAM_ADDRESS); +exports.SYSVAR_INSTRUCTIONS_PUBKEY = new web3_js_1.PublicKey("Sysvar1nstructions1111111111111111111111111"); function FindWorldRegistryPda(programId) { - if (programId === void 0) { - programId = new web3_js_1.PublicKey(exports.PROGRAM_ID); - } - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from("registry")], - programId - )[0]; + if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } + return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("registry")], programId)[0]; } exports.FindWorldRegistryPda = FindWorldRegistryPda; function FindWorldPda(id, programId) { - if (programId === void 0) { - programId = new web3_js_1.PublicKey(exports.PROGRAM_ID); - } - id = CastToBN(id); - var idBuffer = Buffer.from(id.toArrayLike(Buffer, "be", 8)); - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from("world"), idBuffer], - programId - )[0]; + if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } + id = CastToBN(id); + var idBuffer = Buffer.from(id.toArrayLike(Buffer, "be", 8)); + return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("world"), idBuffer], programId)[0]; } exports.FindWorldPda = FindWorldPda; function FindEntityPda(worldId, entityId, extraSeed, programId) { - if (programId === void 0) { - programId = new web3_js_1.PublicKey(exports.PROGRAM_ID); - } - worldId = CastToBN(worldId); - entityId = CastToBN(entityId); - var worldIdBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8)); - var entityIdBuffer = Buffer.from(entityId.toArrayLike(Buffer, "be", 8)); - var seeds = [Buffer.from("entity"), worldIdBuffer]; - if (extraSeed != null) { - seeds.push(Buffer.from(new Uint8Array(8))); - seeds.push(Buffer.from(extraSeed)); - } else { - seeds.push(entityIdBuffer); - } - return web3_js_1.PublicKey.findProgramAddressSync(seeds, programId)[0]; + if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } + worldId = CastToBN(worldId); + entityId = CastToBN(entityId); + var worldIdBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8)); + var entityIdBuffer = Buffer.from(entityId.toArrayLike(Buffer, "be", 8)); + var seeds = [Buffer.from("entity"), worldIdBuffer]; + if (extraSeed != null) { + seeds.push(Buffer.from(new Uint8Array(8))); + seeds.push(Buffer.from(extraSeed)); + } + else { + seeds.push(entityIdBuffer); + } + return web3_js_1.PublicKey.findProgramAddressSync(seeds, programId)[0]; } exports.FindEntityPda = FindEntityPda; function FindComponentPda(componentProgramId, entity, componentId) { - if (componentId === void 0) { - componentId = ""; - } - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(componentId), entity.toBytes()], - componentProgramId - )[0]; + if (componentId === void 0) { componentId = ""; } + return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(componentId), entity.toBytes()], componentProgramId)[0]; } exports.FindComponentPda = FindComponentPda; function CastToBN(id) { - if (!(id instanceof bn_js_1.default)) { - id = new bn_js_1.default(id); - } - return id; + if (!(id instanceof bn_js_1.default)) { + id = new bn_js_1.default(id); + } + return id; } function SerializeArgs(args) { - if (args === void 0) { - args = {}; - } - var jsonString = JSON.stringify(args); - var encoder = new TextEncoder(); - var binaryData = encoder.encode(jsonString); - return Buffer.from( - binaryData.buffer, - binaryData.byteOffset, - binaryData.byteLength - ); + if (args === void 0) { args = {}; } + var jsonString = JSON.stringify(args); + var encoder = new TextEncoder(); + var binaryData = encoder.encode(jsonString); + return Buffer.from(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); } exports.SerializeArgs = SerializeArgs; -//# sourceMappingURL=index.js.map +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.js.map b/clients/bolt-sdk/lib/index.js.map index 172aeed..21aa3e5 100644 --- a/clients/bolt-sdk/lib/index.js.map +++ b/clients/bolt-sdk/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/generated/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gD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;AACP,CAAC;AATD,4CASC;AAED,SAAS,QAAQ,CAAC,EAAqC;IACrD,IAAI,CAAC,CAAC,EAAE,YAAY,eAAE,CAAC,EAAE;QACvB,EAAE,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC;KACjB;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAOD,SAAgB,aAAa,CAAC,IAAc;IAAd,qBAAA,EAAA,SAAc;IAC1C,IAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxC,IAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,IAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,IAAI,CAChB,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,UAAU,EACrB,UAAU,CAAC,UAAU,CACtB,CAAC;AACJ,CAAC;AATD,sCASC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/addEntity.d.ts b/clients/bolt-sdk/lib/instructions/addEntity.d.ts deleted file mode 100644 index a306bb7..0000000 --- a/clients/bolt-sdk/lib/instructions/addEntity.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface AddEntityInstructionArgs { - extraSeed: beet.COption; -} -export declare const addEntityStruct: beet.FixableBeetArgsStruct< - AddEntityInstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface AddEntityInstructionAccounts { - payer: web3.PublicKey; - entity: web3.PublicKey; - world: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const addEntityInstructionDiscriminator: number[]; -export declare function createAddEntityInstruction( - accounts: AddEntityInstructionAccounts, - args?: AddEntityInstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=addEntity.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/addEntity.d.ts.map b/clients/bolt-sdk/lib/instructions/addEntity.d.ts.map deleted file mode 100644 index a88e310..0000000 --- a/clients/bolt-sdk/lib/instructions/addEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"addEntity.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC;AAMD,eAAO,MAAM,eAAe;8BAEE,MAAM,EAAE;EAQrC,CAAC;AAWF,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,iCAAiC,UAE7C,CAAC;AAYF,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,4BAA4B,EACtC,IAAI,GAAE,wBAA8C,EACpD,SAAS,iBAAoE,+BAyC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/addEntity.js b/clients/bolt-sdk/lib/instructions/addEntity.js deleted file mode 100644 index b6671dd..0000000 --- a/clients/bolt-sdk/lib/instructions/addEntity.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createAddEntityInstruction = - exports.addEntityInstructionDiscriminator = - exports.addEntityStruct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.addEntityStruct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["extraSeed", beet.coption(beet.utf8String)], - ], - "AddEntityInstructionArgs" -); -exports.addEntityInstructionDiscriminator = [ - 163, 241, 57, 35, 244, 244, 48, 57, -]; -function createAddEntityInstruction(accounts, args, programId) { - var _a; - if (args === void 0) { - args = { extraSeed: null }; - } - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.addEntityStruct.serialize( - __assign( - { instructionDiscriminator: exports.addEntityInstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: accounts.entity, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.world, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.systemProgram) !== null && _a !== void 0 - ? _a - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _b = accounts.anchorRemainingAccounts; - _i < _b.length; - _i++ - ) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createAddEntityInstruction = createAddEntityInstruction; -//# sourceMappingURL=addEntity.js.map diff --git a/clients/bolt-sdk/lib/instructions/addEntity.js.map b/clients/bolt-sdk/lib/instructions/addEntity.js.map deleted file mode 100644 index 1fb2d95..0000000 --- a/clients/bolt-sdk/lib/instructions/addEntity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"addEntity.js","sourceRoot":"","sources":["../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,eAAe,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAK3D;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;CAC7C,EACD,0BAA0B,CAC3B,CAAC;AAmBW,QAAA,iCAAiC,GAAG;IAC/C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CACnC,CAAC;AAYF,SAAgB,0BAA0B,CACxC,QAAsC,EACtC,IAAoD,EACpD,SAA6E;;IAD7E,qBAAA,EAAA,SAAmC,SAAS,EAAE,IAAI,EAAE;IACpD,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,uBAAe,CAAC,SAAS,YACtC,wBAAwB,EAAE,yCAAiC,IACxD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA5CD,gEA4CC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply.d.ts b/clients/bolt-sdk/lib/instructions/apply.d.ts deleted file mode 100644 index 346d173..0000000 --- a/clients/bolt-sdk/lib/instructions/apply.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface ApplyInstructionArgs { - args: Uint8Array; -} -export declare const applyStruct: beet.FixableBeetArgsStruct< - ApplyInstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface ApplyInstructionAccounts { - componentProgram: web3.PublicKey; - boltSystem: web3.PublicKey; - boltComponent: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const applyInstructionDiscriminator: number[]; -export declare function createApplyInstruction( - accounts: ApplyInstructionAccounts, - args: ApplyInstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=apply.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/apply.d.ts.map b/clients/bolt-sdk/lib/instructions/apply.d.ts.map deleted file mode 100644 index e99e6bd..0000000 --- a/clients/bolt-sdk/lib/instructions/apply.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/apply.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,WAAW;8BAEM,MAAM,EAAE;EAQrC,CAAC;AAaF,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,6BAA6B,UAEzC,CAAC;AAYF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,oBAAoB,EAC1B,SAAS,iBAAoE,+BA8C9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply.js b/clients/bolt-sdk/lib/instructions/apply.js deleted file mode 100644 index 91f8653..0000000 --- a/clients/bolt-sdk/lib/instructions/apply.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApplyInstruction = - exports.applyInstructionDiscriminator = - exports.applyStruct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.applyStruct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], - ], - "ApplyInstructionArgs" -); -exports.applyInstructionDiscriminator = [248, 243, 145, 24, 105, 50, 162, 225]; -function createApplyInstruction(accounts, args, programId) { - var _a, _b; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.applyStruct.serialize( - __assign( - { instructionDiscriminator: exports.applyInstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.componentProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.authority) !== null && _a !== void 0 ? _a : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.instructionSysvarAccount) !== null && _b !== void 0 - ? _b - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _c = accounts.anchorRemainingAccounts; - _i < _c.length; - _i++ - ) { - var acc = _c[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApplyInstruction = createApplyInstruction; -//# sourceMappingURL=apply.js.map diff --git a/clients/bolt-sdk/lib/instructions/apply.js.map b/clients/bolt-sdk/lib/instructions/apply.js.map deleted file mode 100644 index ac787cb..0000000 --- a/clients/bolt-sdk/lib/instructions/apply.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/generated/instructions/apply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAsD;AAezC,QAAA,WAAW,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKvD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,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,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAjDD,wDAiDC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply2.d.ts b/clients/bolt-sdk/lib/instructions/apply2.d.ts deleted file mode 100644 index fcfa2d6..0000000 --- a/clients/bolt-sdk/lib/instructions/apply2.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply2InstructionArgs { - args: Uint8Array; -} -export declare const apply2Struct: beet.FixableBeetArgsStruct< - Apply2InstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface Apply2InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply2InstructionDiscriminator: number[]; -export declare function createApply2Instruction( - accounts: Apply2InstructionAccounts, - args: Apply2InstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=apply2.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/apply2.d.ts.map b/clients/bolt-sdk/lib/instructions/apply2.d.ts.map deleted file mode 100644 index aef0cd9..0000000 --- a/clients/bolt-sdk/lib/instructions/apply2.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply2.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/apply2.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAeF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAwD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply2.js b/clients/bolt-sdk/lib/instructions/apply2.js deleted file mode 100644 index e51ed8c..0000000 --- a/clients/bolt-sdk/lib/instructions/apply2.js +++ /dev/null @@ -1,149 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply2Instruction = - exports.apply2InstructionDiscriminator = - exports.apply2Struct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.apply2Struct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], - ], - "Apply2InstructionArgs" -); -exports.apply2InstructionDiscriminator = [120, 32, 116, 154, 158, 159, 208, 73]; -function createApply2Instruction(accounts, args, programId) { - var _a, _b; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.apply2Struct.serialize( - __assign( - { instructionDiscriminator: exports.apply2InstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.authority) !== null && _a !== void 0 ? _a : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.instructionSysvarAccount) !== null && _b !== void 0 - ? _b - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _c = accounts.anchorRemainingAccounts; - _i < _c.length; - _i++ - ) { - var acc = _c[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply2Instruction = createApply2Instruction; -//# sourceMappingURL=apply2.js.map diff --git a/clients/bolt-sdk/lib/instructions/apply2.js.map b/clients/bolt-sdk/lib/instructions/apply2.js.map deleted file mode 100644 index ee71af3..0000000 --- a/clients/bolt-sdk/lib/instructions/apply2.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply2.js","sourceRoot":"","sources":["../../src/generated/instructions/apply2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAsD;AAezC,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AA0BW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CACrC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,oBAAY,CAAC,SAAS,YACnC,wBAAwB,EAAE,sCAA8B,IACrD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;YAC/B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,SAAS,mCAAI,SAAS;YACvC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,wBAAwB,mCAAI,kCAA0B;YACvE,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA3DD,0DA2DC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply3.d.ts b/clients/bolt-sdk/lib/instructions/apply3.d.ts deleted file mode 100644 index 7c02d18..0000000 --- a/clients/bolt-sdk/lib/instructions/apply3.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply3InstructionArgs { - args: Uint8Array; -} -export declare const apply3Struct: beet.FixableBeetArgsStruct< - Apply3InstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface Apply3InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply3InstructionDiscriminator: number[]; -export declare function createApply3Instruction( - accounts: Apply3InstructionAccounts, - args: Apply3InstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=apply3.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/apply3.d.ts.map b/clients/bolt-sdk/lib/instructions/apply3.d.ts.map deleted file mode 100644 index 302276d..0000000 --- a/clients/bolt-sdk/lib/instructions/apply3.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply3.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/apply3.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAiBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAkE9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply3.js b/clients/bolt-sdk/lib/instructions/apply3.js deleted file mode 100644 index 6e715d0..0000000 --- a/clients/bolt-sdk/lib/instructions/apply3.js +++ /dev/null @@ -1,159 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply3Instruction = - exports.apply3InstructionDiscriminator = - exports.apply3Struct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.apply3Struct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], - ], - "Apply3InstructionArgs" -); -exports.apply3InstructionDiscriminator = [254, 146, 49, 7, 236, 131, 105, 221]; -function createApply3Instruction(accounts, args, programId) { - var _a, _b; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.apply3Struct.serialize( - __assign( - { instructionDiscriminator: exports.apply3InstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.authority) !== null && _a !== void 0 ? _a : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.instructionSysvarAccount) !== null && _b !== void 0 - ? _b - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _c = accounts.anchorRemainingAccounts; - _i < _c.length; - _i++ - ) { - var acc = _c[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply3Instruction = createApply3Instruction; -//# sourceMappingURL=apply3.js.map diff --git a/clients/bolt-sdk/lib/instructions/apply3.js.map b/clients/bolt-sdk/lib/instructions/apply3.js.map deleted file mode 100644 index 60c59f0..0000000 --- a/clients/bolt-sdk/lib/instructions/apply3.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply3.js","sourceRoot":"","sources":["../../src/generated/instructions/apply3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAsD;AAezC,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AA8BW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACpC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,oBAAY,CAAC,SAAS,YACnC,wBAAwB,EAAE,sCAA8B,IACrD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;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,0DAqEC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply4.d.ts b/clients/bolt-sdk/lib/instructions/apply4.d.ts deleted file mode 100644 index 0654b0b..0000000 --- a/clients/bolt-sdk/lib/instructions/apply4.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply4InstructionArgs { - args: Uint8Array; -} -export declare const apply4Struct: beet.FixableBeetArgsStruct< - Apply4InstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface Apply4InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - componentProgram4: web3.PublicKey; - boltComponent4: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply4InstructionDiscriminator: number[]; -export declare function createApply4Instruction( - accounts: Apply4InstructionAccounts, - args: Apply4InstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=apply4.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/apply4.d.ts.map b/clients/bolt-sdk/lib/instructions/apply4.d.ts.map deleted file mode 100644 index 447ddfd..0000000 --- a/clients/bolt-sdk/lib/instructions/apply4.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply4.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/apply4.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAmBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BA4E9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply4.js b/clients/bolt-sdk/lib/instructions/apply4.js deleted file mode 100644 index 7094a0b..0000000 --- a/clients/bolt-sdk/lib/instructions/apply4.js +++ /dev/null @@ -1,169 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply4Instruction = - exports.apply4InstructionDiscriminator = - exports.apply4Struct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.apply4Struct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], - ], - "Apply4InstructionArgs" -); -exports.apply4InstructionDiscriminator = [223, 104, 24, 79, 252, 196, 14, 109]; -function createApply4Instruction(accounts, args, programId) { - var _a, _b; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.apply4Struct.serialize( - __assign( - { instructionDiscriminator: exports.apply4InstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram4, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent4, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.authority) !== null && _a !== void 0 ? _a : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.instructionSysvarAccount) !== null && _b !== void 0 - ? _b - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _c = accounts.anchorRemainingAccounts; - _i < _c.length; - _i++ - ) { - var acc = _c[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply4Instruction = createApply4Instruction; -//# sourceMappingURL=apply4.js.map diff --git a/clients/bolt-sdk/lib/instructions/apply4.js.map b/clients/bolt-sdk/lib/instructions/apply4.js.map deleted file mode 100644 index cc1b7b3..0000000 --- a/clients/bolt-sdk/lib/instructions/apply4.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply4.js","sourceRoot":"","sources":["../../src/generated/instructions/apply4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAsD;AAezC,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AAkCW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CACpC,CAAC;AAYF,SAAgB,uBAAu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SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,wBAAwB,mCAAI,kCAA0B;YACvE,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA/ED,0DA+EC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply5.d.ts b/clients/bolt-sdk/lib/instructions/apply5.d.ts deleted file mode 100644 index 4ea3dc9..0000000 --- a/clients/bolt-sdk/lib/instructions/apply5.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply5InstructionArgs { - args: Uint8Array; -} -export declare const apply5Struct: beet.FixableBeetArgsStruct< - Apply5InstructionArgs & { - instructionDiscriminator: number[]; - } ->; -export interface Apply5InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - componentProgram4: web3.PublicKey; - boltComponent4: web3.PublicKey; - componentProgram5: web3.PublicKey; - boltComponent5: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply5InstructionDiscriminator: number[]; -export declare function createApply5Instruction( - accounts: Apply5InstructionAccounts, - args: Apply5InstructionArgs, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=apply5.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/apply5.d.ts.map b/clients/bolt-sdk/lib/instructions/apply5.d.ts.map deleted file mode 100644 index efcfbe7..0000000 --- a/clients/bolt-sdk/lib/instructions/apply5.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply5.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/apply5.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAqBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAsF9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/apply5.js b/clients/bolt-sdk/lib/instructions/apply5.js deleted file mode 100644 index ca69ffd..0000000 --- a/clients/bolt-sdk/lib/instructions/apply5.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; -var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply5Instruction = - exports.apply5InstructionDiscriminator = - exports.apply5Struct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.apply5Struct = new beet.FixableBeetArgsStruct( - [ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], - ], - "Apply5InstructionArgs" -); -exports.apply5InstructionDiscriminator = [70, 164, 214, 28, 136, 116, 84, 153]; -function createApply5Instruction(accounts, args, programId) { - var _a, _b; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.apply5Struct.serialize( - __assign( - { instructionDiscriminator: exports.apply5InstructionDiscriminator }, - args - ) - )[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram4, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent4, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram5, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent5, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.authority) !== null && _a !== void 0 ? _a : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.instructionSysvarAccount) !== null && _b !== void 0 - ? _b - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _c = accounts.anchorRemainingAccounts; - _i < _c.length; - _i++ - ) { - var acc = _c[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply5Instruction = createApply5Instruction; -//# sourceMappingURL=apply5.js.map diff --git a/clients/bolt-sdk/lib/instructions/apply5.js.map b/clients/bolt-sdk/lib/instructions/apply5.js.map deleted file mode 100644 index c9b0f9c..0000000 --- a/clients/bolt-sdk/lib/instructions/apply5.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply5.js","sourceRoot":"","sources":["../../src/generated/instructions/apply5.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAsD;AAezC,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AAsCW,QAAA,8BAA8B,GAAG;IAC5C,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CACpC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,oBAAY,CAAC,SAAS,YACnC,wBAAwB,EAAE,sCAA8B,IACrD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,iBAAiB;YAClC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,cAAc;Y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A/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAzFD,0DAyFC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/index.d.ts.map b/clients/bolt-sdk/lib/instructions/index.d.ts.map deleted file mode 100644 index 2bb84f0..0000000 --- a/clients/bolt-sdk/lib/instructions/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/index.js b/clients/bolt-sdk/lib/instructions/index.js deleted file mode 100644 index 9404e5f..0000000 --- a/clients/bolt-sdk/lib/instructions/index.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./addEntity"), exports); -__exportStar(require("./apply"), exports); -__exportStar(require("./apply2"), exports); -__exportStar(require("./apply3"), exports); -__exportStar(require("./apply4"), exports); -__exportStar(require("./apply5"), exports); -__exportStar(require("./initializeComponent"), exports); -__exportStar(require("./initializeNewWorld"), exports); -__exportStar(require("./initializeRegistry"), exports); -//# sourceMappingURL=index.js.map diff --git a/clients/bolt-sdk/lib/instructions/index.js.map b/clients/bolt-sdk/lib/instructions/index.js.map deleted file mode 100644 index 14dd0d9..0000000 --- a/clients/bolt-sdk/lib/instructions/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/instructions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts b/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts deleted file mode 100644 index f7b84fe..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeComponentStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeComponentInstructionAccounts { - payer: web3.PublicKey; - data?: web3.PublicKey; - entity: web3.PublicKey; - componentProgram: web3.PublicKey; - authority?: web3.PublicKey; - instructionSysvarAccount?: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeComponentInstructionDiscriminator: number[]; -export declare function createInitializeComponentInstruction( - accounts: InitializeComponentInstructionAccounts, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=initializeComponent.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts.map b/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts.map deleted file mode 100644 index a6684fb..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeComponent.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAQxC,eAAO,MAAM,yBAAyB;8BACV,MAAM,EAAE;EAInC,CAAC;AAcF,MAAM,WAAW,sCAAsC;IACrD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,wBAAwB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1C,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,2CAA2C,UAEvD,CAAC;AAUF,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,sCAAsC,EAChD,SAAS,iBAAoE,+BAyD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeComponent.js b/clients/bolt-sdk/lib/instructions/initializeComponent.js deleted file mode 100644 index 9b5a350..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeComponent.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeComponentInstruction = - exports.initializeComponentInstructionDiscriminator = - exports.initializeComponentStruct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var index_1 = require("../index"); -exports.initializeComponentStruct = new beet.BeetArgsStruct( - [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], - "InitializeComponentInstructionArgs" -); -exports.initializeComponentInstructionDiscriminator = [ - 36, 143, 233, 113, 12, 234, 61, 30, -]; -function createInitializeComponentInstruction(accounts, programId) { - var _a, _b, _c, _d; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.initializeComponentStruct.serialize({ - instructionDiscriminator: - exports.initializeComponentInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: - (_a = accounts.data) !== null && _a !== void 0 - ? _a - : (0, index_1.FindComponentPda)( - accounts.componentProgram, - accounts.entity - ), - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.entity, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_b = accounts.authority) !== null && _b !== void 0 ? _b : programId, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_c = accounts.instructionSysvarAccount) !== null && _c !== void 0 - ? _c - : index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: - (_d = accounts.systemProgram) !== null && _d !== void 0 - ? _d - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _e = accounts.anchorRemainingAccounts; - _i < _e.length; - _i++ - ) { - var acc = _e[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeComponentInstruction = - createInitializeComponentInstruction; -//# sourceMappingURL=initializeComponent.js.map diff --git a/clients/bolt-sdk/lib/instructions/initializeComponent.js.map b/clients/bolt-sdk/lib/instructions/initializeComponent.js.map deleted file mode 100644 index 39b9087..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeComponent.js","sourceRoot":"","sources":["../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,kCAAwE;AAO3D,QAAA,yBAAyB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG9D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,oCAAoC,CACrC,CAAC;AAyBW,QAAA,2CAA2C,GAAG;IACzD,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CACnC,CAAC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AAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA3DD,oFA2DC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts b/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts deleted file mode 100644 index d9876ea..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeNewWorldStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeNewWorldInstructionAccounts { - payer: web3.PublicKey; - world: web3.PublicKey; - registry: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeNewWorldInstructionDiscriminator: number[]; -export declare function createInitializeNewWorldInstruction( - accounts: InitializeNewWorldInstructionAccounts, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=initializeNewWorld.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts.map b/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts.map deleted file mode 100644 index de64bb3..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeNewWorld.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeNewWorld.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAWF,MAAM,WAAW,qCAAqC;IACpD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAwC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeNewWorld.js b/clients/bolt-sdk/lib/instructions/initializeNewWorld.js deleted file mode 100644 index f922cb1..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeNewWorld.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeNewWorldInstruction = - exports.initializeNewWorldInstructionDiscriminator = - exports.initializeNewWorldStruct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.initializeNewWorldStruct = new beet.BeetArgsStruct( - [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], - "InitializeNewWorldInstructionArgs" -); -exports.initializeNewWorldInstructionDiscriminator = [ - 23, 96, 88, 194, 200, 203, 200, 98, -]; -function createInitializeNewWorldInstruction(accounts, programId) { - var _a; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.initializeNewWorldStruct.serialize({ - instructionDiscriminator: - exports.initializeNewWorldInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: accounts.world, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.registry, - isWritable: true, - isSigner: false, - }, - { - pubkey: - (_a = accounts.systemProgram) !== null && _a !== void 0 - ? _a - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _b = accounts.anchorRemainingAccounts; - _i < _b.length; - _i++ - ) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeNewWorldInstruction = - createInitializeNewWorldInstruction; -//# sourceMappingURL=initializeNewWorld.js.map diff --git a/clients/bolt-sdk/lib/instructions/initializeNewWorld.js.map b/clients/bolt-sdk/lib/instructions/initializeNewWorld.js.map deleted file mode 100644 index 6af187d..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeNewWorld.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeNewWorld.js","sourceRoot":"","sources":["../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;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AC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA1CD,kFA0CC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts b/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts deleted file mode 100644 index 4e97da9..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeRegistryStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeRegistryInstructionAccounts { - registry: web3.PublicKey; - payer: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeRegistryInstructionDiscriminator: number[]; -export declare function createInitializeRegistryInstruction( - accounts: InitializeRegistryInstructionAccounts, - programId?: web3.PublicKey -): web3.TransactionInstruction; -//# sourceMappingURL=initializeRegistry.d.ts.map diff --git a/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts.map b/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts.map deleted file mode 100644 index a416203..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeRegistry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeRegistry.d.ts","sourceRoot":"","sources":["../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAUF,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAmC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/instructions/initializeRegistry.js b/clients/bolt-sdk/lib/instructions/initializeRegistry.js deleted file mode 100644 index e0f0789..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeRegistry.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeRegistryInstruction = - exports.initializeRegistryInstructionDiscriminator = - exports.initializeRegistryStruct = - void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.initializeRegistryStruct = new beet.BeetArgsStruct( - [["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], - "InitializeRegistryInstructionArgs" -); -exports.initializeRegistryInstructionDiscriminator = [ - 189, 181, 20, 17, 174, 57, 249, 59, -]; -function createInitializeRegistryInstruction(accounts, programId) { - var _a; - if (programId === void 0) { - programId = new web3.PublicKey( - "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" - ); - } - var data = exports.initializeRegistryStruct.serialize({ - instructionDiscriminator: - exports.initializeRegistryInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.registry, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: - (_a = accounts.systemProgram) !== null && _a !== void 0 - ? _a - : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for ( - var _i = 0, _b = accounts.anchorRemainingAccounts; - _i < _b.length; - _i++ - ) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeRegistryInstruction = - createInitializeRegistryInstruction; -//# sourceMappingURL=initializeRegistry.js.map diff --git a/clients/bolt-sdk/lib/instructions/initializeRegistry.js.map b/clients/bolt-sdk/lib/instructions/initializeRegistry.js.map deleted file mode 100644 index 35b83a8..0000000 --- a/clients/bolt-sdk/lib/instructions/initializeRegistry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeRegistry.js","sourceRoot":"","sources":["../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QAAA,wBAAwB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG7D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAA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/transactions.d.ts deleted file mode 100644 index 7e5df6c..0000000 --- a/clients/bolt-sdk/lib/transactions/transactions.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import BN from "bn.js"; -import type web3 from "@solana/web3.js"; -import { type Connection, type PublicKey, Transaction } from "@solana/web3.js"; -export declare function InitializeNewWorld({ - payer, - connection, -}: { - payer: PublicKey; - connection: Connection; -}): Promise<{ - transaction: Transaction; - worldPda: PublicKey; - worldId: BN; -}>; -export declare function AddEntity({ - payer, - world, - connection, -}: { - payer: PublicKey; - world: PublicKey; - connection: Connection; -}): Promise<{ - transaction: Transaction; - entityPda: PublicKey; - entityId: BN; -}>; -export declare function InitializeComponent({ - payer, - entity, - componentId, - seed, - authority, - anchorRemainingAccounts, -}: { - payer: PublicKey; - entity: PublicKey; - componentId: PublicKey; - seed?: string; - authority?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -}): Promise<{ - transaction: Transaction; - componentPda: PublicKey; -}>; -interface ApplySystemInstruction { - entity: PublicKey; - components: PublicKey[]; - system: PublicKey; - authority: PublicKey; - seeds?: string[]; - extraAccounts?: web3.AccountMeta[]; - args?: object; -} -export declare function createApplySystemInstruction({ - entity, - components, - system, - seeds, - authority, - extraAccounts, - args, -}: ApplySystemInstruction): web3.TransactionInstruction; -export declare function ApplySystem({ - authority, - system, - entity, - components, - args, - extraAccounts, - seeds, -}: { - authority: PublicKey; - system: PublicKey; - entity: PublicKey; - components: PublicKey[]; - args?: object; - extraAccounts?: web3.AccountMeta[]; - seeds?: string[]; -}): Promise<{ - transaction: Transaction; -}>; -export {}; -//# sourceMappingURL=transactions.d.ts.map diff --git a/clients/bolt-sdk/lib/transactions/transactions.d.ts.map b/clients/bolt-sdk/lib/transactions/transactions.d.ts.map deleted file mode 100644 index 772da16..0000000 --- a/clients/bolt-sdk/lib/transactions/transactions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/generated/transactions/transactions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;IAClB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,SAAS,EACT,aAAa,EACb,IAAI,GACL,EAAE,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAyCtD;AAaD,wBAAsB,WAAW,CAAC,EAChC,SAAS,EACT,MAAM,EACN,MAAM,EACN,UAAU,EACV,IAAS,EACT,aAAa,EACb,KAAK,GACN,EAAE;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC,CAaxC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/transactions/transactions.js b/clients/bolt-sdk/lib/transactions/transactions.js deleted file mode 100644 index 6e82c9e..0000000 --- a/clients/bolt-sdk/lib/transactions/transactions.js +++ /dev/null @@ -1,345 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [], - }, - f, - y, - t, - g; - return ( - (g = { next: verb(0), throw: verb(1), return: verb(2) }), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this; - }), - g - ); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t; - if (((y = 0), t)) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ApplySystem = - exports.createApplySystemInstruction = - exports.InitializeComponent = - exports.AddEntity = - exports.InitializeNewWorld = - void 0; -var index_1 = require("../index"); -var bn_js_1 = __importDefault(require("bn.js")); -var web3_js_1 = require("@solana/web3.js"); -var MAX_COMPONENTS = 5; -function InitializeNewWorld(_a) { - var payer = _a.payer, - connection = _a.connection; - return __awaiter(this, void 0, void 0, function () { - var registryPda, registry, worldId, worldPda, initializeWorldIx; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - registryPda = (0, index_1.FindWorldRegistryPda)(); - return [ - 4, - index_1.Registry.fromAccountAddress(connection, registryPda), - ]; - case 1: - registry = _b.sent(); - worldId = new bn_js_1.default(registry.worlds); - worldPda = (0, index_1.FindWorldPda)(new bn_js_1.default(worldId)); - initializeWorldIx = (0, index_1.createInitializeNewWorldInstruction)({ - world: worldPda, - registry: registryPda, - payer: payer, - }); - return [ - 2, - { - transaction: new web3_js_1.Transaction().add(initializeWorldIx), - worldPda: worldPda, - worldId: worldId, - }, - ]; - } - }); - }); -} -exports.InitializeNewWorld = InitializeNewWorld; -function AddEntity(_a) { - var payer = _a.payer, - world = _a.world, - connection = _a.connection; - return __awaiter(this, void 0, void 0, function () { - var worldInstance, entityId, entityPda, createEntityIx; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - return [4, index_1.World.fromAccountAddress(connection, world)]; - case 1: - worldInstance = _b.sent(); - entityId = new bn_js_1.default(worldInstance.entities); - entityPda = (0, index_1.FindEntityPda)( - new bn_js_1.default(worldInstance.id), - entityId - ); - createEntityIx = (0, index_1.createAddEntityInstruction)({ - world: world, - payer: payer, - entity: entityPda, - }); - return [ - 2, - { - transaction: new web3_js_1.Transaction().add(createEntityIx), - entityPda: entityPda, - entityId: entityId, - }, - ]; - } - }); - }); -} -exports.AddEntity = AddEntity; -function InitializeComponent(_a) { - var payer = _a.payer, - entity = _a.entity, - componentId = _a.componentId, - _b = _a.seed, - seed = _b === void 0 ? "" : _b, - authority = _a.authority, - anchorRemainingAccounts = _a.anchorRemainingAccounts; - return __awaiter(this, void 0, void 0, function () { - var componentPda, initComponentIx; - return __generator(this, function (_c) { - componentPda = (0, index_1.FindComponentPda)(componentId, entity, seed); - initComponentIx = (0, index_1.createInitializeComponentInstruction)({ - payer: payer, - entity: entity, - data: componentPda, - componentProgram: componentId, - authority: authority, - anchorRemainingAccounts: anchorRemainingAccounts, - }); - return [ - 2, - { - transaction: new web3_js_1.Transaction().add(initComponentIx), - componentPda: componentPda, - }, - ]; - }); - }); -} -exports.InitializeComponent = InitializeComponent; -function createApplySystemInstruction(_a) { - var entity = _a.entity, - components = _a.components, - system = _a.system, - seeds = _a.seeds, - authority = _a.authority, - extraAccounts = _a.extraAccounts, - args = _a.args; - var instructionFunctions = { - createApplyInstruction: index_1.createApplyInstruction, - createApply2Instruction: index_1.createApply2Instruction, - createApply3Instruction: index_1.createApply3Instruction, - createApply4Instruction: index_1.createApply4Instruction, - createApply5Instruction: index_1.createApply5Instruction, - }; - if (components.length === 0) throw new Error("No components provided"); - if (seeds == null) seeds = new Array(components.length).fill(""); - if (seeds.length !== components.length) - throw new Error("Seed length does not match components length"); - var componentPdas = []; - for (var i = 0; i < components.length; i++) { - var componentPda = (0, index_1.FindComponentPda)( - components[i], - entity, - seeds[i] - ); - componentPdas.push(componentPda); - } - if (components.length < 1 || components.length > MAX_COMPONENTS) { - throw new Error( - "Not implemented for component counts outside 1-".concat(MAX_COMPONENTS) - ); - } - var instructionArgs = { - authority: authority, - boltSystem: system, - anchorRemainingAccounts: extraAccounts, - }; - components.forEach(function (component, index) { - instructionArgs[getBoltComponentProgramName(index, components.length)] = - component; - instructionArgs[getBoltComponentName(index, components.length)] = - componentPdas[index]; - }); - var functionName = getApplyInstructionFunctionName(components.length); - return instructionFunctions[functionName](instructionArgs, { - args: (0, index_1.SerializeArgs)(args), - }); -} -exports.createApplySystemInstruction = createApplySystemInstruction; -function ApplySystem(_a) { - var authority = _a.authority, - system = _a.system, - entity = _a.entity, - components = _a.components, - _b = _a.args, - args = _b === void 0 ? {} : _b, - extraAccounts = _a.extraAccounts, - seeds = _a.seeds; - return __awaiter(this, void 0, void 0, function () { - var applySystemIx; - return __generator(this, function (_c) { - applySystemIx = createApplySystemInstruction({ - entity: entity, - components: components, - system: system, - authority: authority, - seeds: seeds, - extraAccounts: extraAccounts, - args: args, - }); - return [ - 2, - { - transaction: new web3_js_1.Transaction().add(applySystemIx), - }, - ]; - }); - }); -} -exports.ApplySystem = ApplySystem; -function getApplyInstructionFunctionName(componentsLength) { - if (componentsLength === 1) return "createApplyInstruction"; - return "createApply".concat(componentsLength, "Instruction"); -} -function getBoltComponentName(index, componentsLength) { - if (componentsLength === 1) return "boltComponent"; - return "boltComponent".concat(index + 1); -} -function getBoltComponentProgramName(index, componentsLength) { - if (componentsLength === 1) return "componentProgram"; - return "componentProgram".concat(index + 1); -} -//# sourceMappingURL=transactions.js.map diff --git a/clients/bolt-sdk/lib/transactions/transactions.js.map b/clients/bolt-sdk/lib/transactions/transactions.js.map deleted file mode 100644 index dea0ed3..0000000 --- a/clients/bolt-sdk/lib/transactions/transactions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/generated/transactions/transactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAgBkB;AAClB,gDAAuB;AAEvB,2CAA+E;AAE/E,IAAM,cAAc,GAAG,CAAC,CAAC;AAQzB,SAAsB,kBAAkB,CAAC,EAMxC;QALC,KAAK,WAAA,EACL,UAAU,gBAAA;;;;;;oBAKJ,WAAW,GAAG,IAAA,4BAAoB,GAAE,CAAC;oBAC1B,WAAM,gBAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,WAAW,CAAC,EAAA;;oBAArE,QAAQ,GAAG,SAA0D;oBACrE,OAAO,GAAG,IAAI,eAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBAClC,QAA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C,aAAa,CAAC;iBAClD,EAAC;;;CACH;AA7BD,kCA6BC;AAED,SAAS,+BAA+B,CAAC,gBAAwB;IAC/D,IAAI,gBAAgB,KAAK,CAAC;QAAE,OAAO,wBAAwB,CAAC;IAC5D,OAAO,qBAAc,gBAAgB,gBAAa,CAAC;AACrD,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa,EAAE,gBAAwB;IACnE,IAAI,gBAAgB,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IACnD,OAAO,uBAAgB,KAAK,GAAG,CAAC,CAAE,CAAC;AACrC,CAAC;AAED,SAAS,2BAA2B,CAAC,KAAa,EAAE,gBAAwB;IAC1E,IAAI,gBAAgB,KAAK,CAAC;QAAE,OAAO,kBAAkB,CAAC;IACtD,OAAO,0BAAmB,KAAK,GAAG,CAAC,CAAE,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.d.ts b/clients/bolt-sdk/lib/world/transactions.d.ts new file mode 100644 index 0000000..3e7484b --- /dev/null +++ b/clients/bolt-sdk/lib/world/transactions.d.ts @@ -0,0 +1,51 @@ +import BN from "bn.js"; +import type web3 from "@solana/web3.js"; +import { type Connection, type PublicKey, Transaction } from "@solana/web3.js"; +export declare function InitializeNewWorld({ payer, connection, }: { + payer: PublicKey; + connection: Connection; +}): Promise<{ + transaction: Transaction; + worldPda: PublicKey; + worldId: BN; +}>; +export declare function AddEntity({ payer, world, seed, connection, }: { + payer: PublicKey; + world: PublicKey; + seed?: string; + connection: Connection; +}): Promise<{ + transaction: Transaction; + entityPda: PublicKey; + entityId: BN; +}>; +export declare function InitializeComponent({ payer, entity, componentId, seed, authority, anchorRemainingAccounts, }: { + payer: PublicKey; + entity: PublicKey; + componentId: PublicKey; + seed?: string; + authority?: web3.PublicKey; + anchorRemainingAccounts?: web3.AccountMeta[]; +}): Promise<{ + transaction: Transaction; + componentPda: PublicKey; +}>; +interface ApplySystemEntity { + entity: PublicKey; + components: ApplySystemComponent[]; +} +interface ApplySystemComponent { + id: PublicKey; + seed?: string; +} +export declare function ApplySystem({ authority, systemId, entities, extraAccounts, args, }: { + authority: PublicKey; + systemId: PublicKey; + entities: ApplySystemEntity[]; + extraAccounts?: web3.AccountMeta[]; + args?: object; +}): Promise<{ + transaction: Transaction; +}>; +export {}; +//# sourceMappingURL=transactions.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.d.ts.map b/clients/bolt-sdk/lib/world/transactions.d.ts.map new file mode 100644 index 0000000..ec2edce --- /dev/null +++ b/clients/bolt-sdk/lib/world/transactions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/world/transactions.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAW/E,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,CAAC,CAe1E;AASD,wBAAsB,SAAS,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,IAAI,EACJ,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,EAAE,CAAA;CAAE,CAAC,CAkB5E;AAYD,wBAAsB,mBAAmB,CAAC,EACxC,KAAK,EACL,MAAM,EACN,WAAW,EACX,IAAS,EACT,SAAS,EACT,uBAAuB,GACxB,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC,CAgBjE;AA6ED,UAAU,iBAAiB;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AACD,UAAU,oBAAoB;IAC5B,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAWD,wBAAsB,WAAW,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,IAAS,GACV,EAAE;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC,CAWxC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.js b/clients/bolt-sdk/lib/world/transactions.js new file mode 100644 index 0000000..fbd12bd --- /dev/null +++ b/clients/bolt-sdk/lib/world/transactions.js @@ -0,0 +1,198 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApplySystem = exports.InitializeComponent = exports.AddEntity = exports.InitializeNewWorld = void 0; +var index_1 = require("../index"); +var bn_js_1 = __importDefault(require("bn.js")); +var web3_js_1 = require("@solana/web3.js"); +var generated_1 = require("generated"); +var MAX_COMPONENTS = 5; +function InitializeNewWorld(_a) { + var payer = _a.payer, connection = _a.connection; + return __awaiter(this, void 0, void 0, function () { + var registryPda, registry, worldId, worldPda, initializeWorldIx; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + registryPda = (0, index_1.FindWorldRegistryPda)(); + return [4, index_1.Registry.fromAccountAddress(connection, registryPda)]; + case 1: + registry = _b.sent(); + worldId = new bn_js_1.default(registry.worlds); + worldPda = (0, index_1.FindWorldPda)(new bn_js_1.default(worldId)); + initializeWorldIx = (0, index_1.createInitializeNewWorldInstruction)({ + world: worldPda, + registry: registryPda, + payer: payer, + }); + return [2, { + transaction: new web3_js_1.Transaction().add(initializeWorldIx), + worldPda: worldPda, + worldId: worldId, + }]; + } + }); + }); +} +exports.InitializeNewWorld = InitializeNewWorld; +function AddEntity(_a) { + var payer = _a.payer, world = _a.world, seed = _a.seed, connection = _a.connection; + return __awaiter(this, void 0, void 0, function () { + var worldInstance, entityId, entityPda, createEntityIx; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4, index_1.World.fromAccountAddress(connection, world)]; + case 1: + worldInstance = _b.sent(); + entityId = new bn_js_1.default(worldInstance.entities); + entityPda = (0, index_1.FindEntityPda)(new bn_js_1.default(worldInstance.id), entityId); + createEntityIx = (0, index_1.createAddEntityInstruction)({ + world: world, + payer: payer, + entity: entityPda, + }, { extraSeed: seed !== null && seed !== void 0 ? seed : null }); + return [2, { + transaction: new web3_js_1.Transaction().add(createEntityIx), + entityPda: entityPda, + entityId: entityId, + }]; + } + }); + }); +} +exports.AddEntity = AddEntity; +function InitializeComponent(_a) { + var payer = _a.payer, entity = _a.entity, componentId = _a.componentId, _b = _a.seed, seed = _b === void 0 ? "" : _b, authority = _a.authority, anchorRemainingAccounts = _a.anchorRemainingAccounts; + return __awaiter(this, void 0, void 0, function () { + var componentPda, initComponentIx; + return __generator(this, function (_c) { + componentPda = (0, index_1.FindComponentPda)(componentId, entity, seed); + initComponentIx = (0, index_1.createInitializeComponentInstruction)({ + payer: payer, + entity: entity, + data: componentPda, + componentProgram: componentId, + authority: authority !== null && authority !== void 0 ? authority : generated_1.PROGRAM_ID, + instructionSysvarAccount: index_1.SYSVAR_INSTRUCTIONS_PUBKEY, + anchorRemainingAccounts: anchorRemainingAccounts, + }); + return [2, { + transaction: new web3_js_1.Transaction().add(initComponentIx), + componentPda: componentPda, + }]; + }); + }); +} +exports.InitializeComponent = InitializeComponent; +function getApplyInstructionFunctionName(componentsCount) { + if (componentsCount === 1) + return "createApplyInstruction"; + return "createApply".concat(componentsCount, "Instruction"); +} +function getBoltComponentName(index, componentsCount) { + if (componentsCount === 1) + return "boltComponent"; + return "boltComponent".concat(index + 1); +} +function getBoltComponentProgramName(index, componentsCount) { + if (componentsCount === 1) + return "componentProgram"; + return "componentProgram".concat(index + 1); +} +function createApplySystemInstruction(_a) { + var authority = _a.authority, systemId = _a.systemId, entities = _a.entities, extraAccounts = _a.extraAccounts, args = _a.args; + var componentCount = 0; + entities.forEach(function (entity) { + componentCount += entity.components.length; + }); + if (componentCount <= 0) { + throw new Error("No components provided"); + } + if (componentCount > MAX_COMPONENTS) { + throw new Error("Not implemented for component counts outside 1-".concat(MAX_COMPONENTS)); + } + var instructionArgs = { + authority: authority, + boltSystem: systemId, + instructionSysvarAccount: index_1.SYSVAR_INSTRUCTIONS_PUBKEY, + anchorRemainingAccounts: extraAccounts, + }; + entities.forEach(function (entity) { + entity.components.forEach(function (component) { + var _a; + var componentPda = (0, index_1.FindComponentPda)(component.id, entity.entity, (_a = component.seed) !== null && _a !== void 0 ? _a : ""); + instructionArgs[getBoltComponentProgramName(componentCount, componentCount)] = component.id; + instructionArgs[getBoltComponentName(componentCount, componentCount)] = + componentPda; + }); + }); + var instructionFunctions = { + createApplyInstruction: index_1.createApplyInstruction, + createApply2Instruction: index_1.createApply2Instruction, + createApply3Instruction: index_1.createApply3Instruction, + createApply4Instruction: index_1.createApply4Instruction, + createApply5Instruction: index_1.createApply5Instruction, + }; + var functionName = getApplyInstructionFunctionName(componentCount); + return instructionFunctions[functionName](instructionArgs, { + args: (0, index_1.SerializeArgs)(args), + }); +} +function ApplySystem(_a) { + var authority = _a.authority, systemId = _a.systemId, entities = _a.entities, extraAccounts = _a.extraAccounts, _b = _a.args, args = _b === void 0 ? {} : _b; + return __awaiter(this, void 0, void 0, function () { + var applySystemIx; + return __generator(this, function (_c) { + applySystemIx = createApplySystemInstruction({ + authority: authority, + systemId: systemId, + entities: entities, + extraAccounts: extraAccounts, + args: args, + }); + return [2, { + transaction: new web3_js_1.Transaction().add(applySystemIx), + }]; + }); + }); +} +exports.ApplySystem = ApplySystem; +//# sourceMappingURL=transactions.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.js.map b/clients/bolt-sdk/lib/world/transactions.js.map new file mode 100644 index 0000000..1554bd9 --- /dev/null +++ b/clients/bolt-sdk/lib/world/transactions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/world/transactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAiBkB;AAClB,gDAAuB;AAEvB,2CAA+E;AAC/E,uCAAuC;AAEvC,IAAM,cAAc,GAAG,CAAC,CAAC;AAQzB,SAAsB,kBAAkB,CAAC,EAMxC;QALC,KAAK,WAAA,EACL,UAAU,gBAAA;;;;;;oBAKJ,WAAW,GAAG,IAAA,4BAAoB,GAAE,CAAC;oBAC1B,WAAM,gBAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,WAAW,CAAC,EAAA;;oBAArE,QAAQ,GAAG,SAA0D;oBACrE,OAAO,GAAG,IAAI,eAAE,CAAC,QAAQ,CAAC,MAAM,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AQ,cAAA,EACR,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,YAAS,EAAT,IAAI,mBAAG,EAAE,KAAA;;;;YAQH,aAAa,GAAG,4BAA4B,CAAC;gBACjD,SAAS,WAAA;gBACT,QAAQ,UAAA;gBACR,QAAQ,UAAA;gBACR,aAAa,eAAA;gBACb,IAAI,MAAA;aACL,CAAC,CAAC;YACH,WAAO;oBACL,WAAW,EAAE,IAAI,qBAAW,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC;iBAClD,EAAC;;;CACH;AAvBD,kCAuBC"} \ No newline at end of file diff --git a/clients/bolt-sdk/src/index.js b/clients/bolt-sdk/src/index.js deleted file mode 100644 index 58997c3..0000000 --- a/clients/bolt-sdk/src/index.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROGRAM_ID = exports.PROGRAM_ADDRESS = void 0; -const web3_js_1 = require("@solana/web3.js"); -__exportStar(require("./accounts"), exports); -__exportStar(require("./instructions"), exports); -/** - * Program address - * - * @category constants - * @category generated - */ -exports.PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; -/** - * Program public key - * - * @category constants - * @category generated - */ -exports.PROGRAM_ID = new web3_js_1.PublicKey(exports.PROGRAM_ADDRESS); diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 3a61beb..4017fc3 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -3,7 +3,7 @@ import BN from "bn.js"; import { PROGRAM_ID } from "generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; -export * from "./transactions/transactions"; +export * from "./world/transactions"; export * from "./delegation/accounts"; export * from "./delegation/delegate"; diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index bcafa75..bfe2007 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -62,10 +62,12 @@ export async function InitializeNewWorld({ export async function AddEntity({ payer, world, + seed, connection, }: { payer: PublicKey; world: PublicKey; + seed?: string; connection: Connection; }): Promise<{ transaction: Transaction; entityPda: PublicKey; entityId: BN }> { const worldInstance = await World.fromAccountAddress(connection, world); @@ -78,7 +80,7 @@ export async function AddEntity({ payer, entity: entityPda, }, - { extraSeed: null } + { extraSeed: seed ?? null } ); return { transaction: new Transaction().add(createEntityIx), @@ -157,10 +159,9 @@ function createApplySystemInstruction({ args, }: ApplySystemInstruction): web3.TransactionInstruction { let componentCount = 0; - for (const entityIndex in entities) { - const entity = entities[entityIndex]; + entities.forEach(function (entity) { componentCount += entity.components.length; - } + }); if (componentCount <= 0) { throw new Error("No components provided"); } @@ -177,10 +178,8 @@ function createApplySystemInstruction({ anchorRemainingAccounts: extraAccounts, }; - for (const entityIndex in entities) { - const entity = entities[entityIndex]; - for (const componentIndex in entity.components) { - const component = entity.components[componentIndex]; + entities.forEach(function (entity) { + entity.components.forEach(function (component) { const componentPda = FindComponentPda( component.id, entity.entity, @@ -191,9 +190,8 @@ function createApplySystemInstruction({ ] = component.id; instructionArgs[getBoltComponentName(componentCount, componentCount)] = componentPda; - componentCount++; - } - } + }); + }); const instructionFunctions = { createApplyInstruction, diff --git a/package.json b/package.json index c0f21a7..3db2601 100644 --- a/package.json +++ b/package.json @@ -28,5 +28,6 @@ "eslint-plugin-react": "^7.32.2", "prettier": "^2.6.2" }, - "license": "MIT" -} \ No newline at end of file + "license": "MIT", + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/tests/bolt.ts b/tests/bolt.ts index 3af0505..43254ad 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -11,6 +11,7 @@ import { type World } from "../target/types/world"; import { expect } from "chai"; import BN from "bn.js"; import { + AddEntity, createDelegateInstruction, createInitializeRegistryInstruction, DELEGATION_PROGRAM_ID, @@ -18,6 +19,7 @@ import { FindEntityPda, FindWorldPda, FindWorldRegistryPda, + InitializeNewWorld, SYSVAR_INSTRUCTIONS_PUBKEY, } from "../clients/bolt-sdk"; import { createUndelegateInstruction } from "../clients/bolt-sdk/lib/delegation/undelegate"; @@ -61,9 +63,10 @@ describe("bolt", () => { anchor.workspace.SystemApplyVelocity as Program ).programId; - let entity1: PublicKey; - let entity2: PublicKey; - let entity5: PublicKey; + let worldPda: PublicKey; + let entity1Pda: PublicKey; + let entity2Pda: PublicKey; + let entity5Pda: PublicKey; let componentPositionEntity1: PublicKey; let componentPositionEntity2: PublicKey; let componentPositionEntity5: PublicKey; @@ -75,118 +78,74 @@ describe("bolt", () => { registry: registryPda, payer: provider.wallet.publicKey, }); - const tx = new anchor.web3.Transaction().add(initializeRegistryIx); await provider.sendAndConfirm(tx); }); it("InitializeNewWorld", async () => { - const registryPda = FindWorldRegistryPda(worldProgram.programId); - - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - const res = await worldProgram.methods - .initializeNewWorld() - .accounts({ - world: worldPda, - registry: registryPda, - payer: provider.wallet.publicKey, - }) - .rpc(); - console.log(res); + const initializeNewWorld = await InitializeNewWorld({ + payer: provider.wallet.publicKey, + connection: provider.connection, + }); + await provider.sendAndConfirm(initializeNewWorld.transaction); + worldPda = initializeNewWorld.worldPda; // Saved for later }); it("InitializeNewWorld 2", async () => { - const registryPda = FindWorldRegistryPda(worldProgram.programId); - - const worldPda = FindWorldPda(new BN(1), worldProgram.programId); - await worldProgram.methods - .initializeNewWorld() - .accounts({ - world: worldPda, - registry: registryPda, - payer: provider.wallet.publicKey, - }) - .rpc(); + const initializeNewWorld = await InitializeNewWorld({ + payer: provider.wallet.publicKey, + connection: provider.connection, + }); + await provider.sendAndConfirm(initializeNewWorld.transaction); }); it("Add entity 1", async () => { - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - entity1 = FindEntityPda(new BN(0), new BN(0), null, worldProgram.programId); - await worldProgram.methods - .addEntity(null) - .accounts({ - world: worldPda, - entity: entity1, - payer: provider.wallet.publicKey, - }) - .rpc(); + const addEntity = await AddEntity({ + payer: provider.wallet.publicKey, + world: worldPda, + connection: provider.connection, + }); + await provider.sendAndConfirm(addEntity.transaction); + entity1Pda = addEntity.entityPda; // Saved for later }); it("Add entity 2", async () => { - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - - entity2 = FindEntityPda(new BN(0), new BN(1), null, worldProgram.programId); - await worldProgram.methods - .addEntity(null) - .accounts({ - world: worldPda, - entity: entity2, - payer: provider.wallet.publicKey, - }) - .rpc(); + const addEntity = await AddEntity({ + payer: provider.wallet.publicKey, + world: worldPda, + connection: provider.connection, + }); + await provider.sendAndConfirm(addEntity.transaction); + entity2Pda = addEntity.entityPda; // Saved for later }); it("Add entity 3", async () => { - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - - const entityPda = FindEntityPda( - new BN(0), - new BN(2), - null, - worldProgram.programId - ); - await worldProgram.methods - .addEntity(null) - .accounts({ - world: worldPda, - entity: entityPda, - payer: provider.wallet.publicKey, - }) - .rpc(); + const addEntity = await AddEntity({ + payer: provider.wallet.publicKey, + world: worldPda, + connection: provider.connection, + }); + await provider.sendAndConfirm(addEntity.transaction); }); it("Add entity 4 with extra seeds", async () => { - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - const seed = "extra-seed"; - const entity4 = FindEntityPda( - new BN(0), - new BN(3), - seed, - worldProgram.programId - ); - - await worldProgram.methods - .addEntity(seed) - .accounts({ - world: worldPda, - entity: entity4, - payer: provider.wallet.publicKey, - }) - .rpc(); + const addEntity = await AddEntity({ + payer: provider.wallet.publicKey, + world: worldPda, + seed: "extra-seed", + connection: provider.connection, + }); + await provider.sendAndConfirm(addEntity.transaction); }); it("Add entity 5", async () => { - const worldPda = FindWorldPda(new BN(0), worldProgram.programId); - entity5 = FindEntityPda(new BN(0), new BN(4), null, worldProgram.programId); - - await worldProgram.methods - .addEntity(null) - .accounts({ - world: worldPda, - entity: entity5, - payer: provider.wallet.publicKey, - }) - .rpc(); + const addEntity = await AddEntity({ + payer: provider.wallet.publicKey, + world: worldPda, + connection: provider.connection, + }); + await provider.sendAndConfirm(addEntity.transaction); + entity5Pda = addEntity.entityPda; // Saved for later }); it("Initialize Original Component on Entity 1, trough the world instance", async () => { From b990a2c3db573dc4acd4885bc42a03854c976bfc Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Thu, 13 Jun 2024 18:34:58 +0100 Subject: [PATCH 12/31] remove-lib --- clients/bolt-sdk/lib/delegation/accounts.d.ts | 10 - .../bolt-sdk/lib/delegation/accounts.d.ts.map | 1 - clients/bolt-sdk/lib/delegation/accounts.js | 30 --- .../bolt-sdk/lib/delegation/accounts.js.map | 1 - clients/bolt-sdk/lib/delegation/delegate.d.ts | 23 -- .../bolt-sdk/lib/delegation/delegate.d.ts.map | 1 - clients/bolt-sdk/lib/delegation/delegate.js | 103 --------- .../bolt-sdk/lib/delegation/delegate.js.map | 1 - .../bolt-sdk/lib/delegation/undelegate.d.ts | 20 -- .../lib/delegation/undelegate.d.ts.map | 1 - clients/bolt-sdk/lib/delegation/undelegate.js | 99 --------- .../bolt-sdk/lib/delegation/undelegate.js.map | 1 - .../lib/generated/accounts/Entity.d.ts | 33 --- .../lib/generated/accounts/Entity.d.ts.map | 1 - .../bolt-sdk/lib/generated/accounts/Entity.js | 158 -------------- .../lib/generated/accounts/Entity.js.map | 1 - .../lib/generated/accounts/Registry.d.ts | 33 --- .../lib/generated/accounts/Registry.d.ts.map | 1 - .../lib/generated/accounts/Registry.js | 158 -------------- .../lib/generated/accounts/Registry.js.map | 1 - .../lib/generated/accounts/World.d.ts | 39 ---- .../lib/generated/accounts/World.d.ts.map | 1 - .../bolt-sdk/lib/generated/accounts/World.js | 172 --------------- .../lib/generated/accounts/World.js.map | 1 - .../lib/generated/accounts/index.d.ts | 12 -- .../lib/generated/accounts/index.d.ts.map | 1 - .../bolt-sdk/lib/generated/accounts/index.js | 25 --- .../lib/generated/accounts/index.js.map | 1 - .../bolt-sdk/lib/generated/errors/index.d.ts | 13 -- .../lib/generated/errors/index.d.ts.map | 1 - .../bolt-sdk/lib/generated/errors/index.js | 47 ----- .../lib/generated/errors/index.js.map | 1 - clients/bolt-sdk/lib/generated/index.d.ts | 7 - clients/bolt-sdk/lib/generated/index.d.ts.map | 1 - clients/bolt-sdk/lib/generated/index.js | 24 --- clients/bolt-sdk/lib/generated/index.js.map | 1 - .../lib/generated/instructions/addEntity.d.ts | 18 -- .../generated/instructions/addEntity.d.ts.map | 1 - .../lib/generated/instructions/addEntity.js | 87 -------- .../generated/instructions/addEntity.js.map | 1 - .../lib/generated/instructions/apply.d.ts | 19 -- .../lib/generated/instructions/apply.d.ts.map | 1 - .../lib/generated/instructions/apply.js | 91 -------- .../lib/generated/instructions/apply.js.map | 1 - .../lib/generated/instructions/apply2.d.ts | 21 -- .../generated/instructions/apply2.d.ts.map | 1 - .../lib/generated/instructions/apply2.js | 101 --------- .../lib/generated/instructions/apply2.js.map | 1 - .../lib/generated/instructions/apply3.d.ts | 23 -- .../generated/instructions/apply3.d.ts.map | 1 - .../lib/generated/instructions/apply3.js | 111 ---------- .../lib/generated/instructions/apply3.js.map | 1 - .../lib/generated/instructions/apply4.d.ts | 25 --- .../generated/instructions/apply4.d.ts.map | 1 - .../lib/generated/instructions/apply4.js | 121 ----------- .../lib/generated/instructions/apply4.js.map | 1 - .../lib/generated/instructions/apply5.d.ts | 27 --- .../generated/instructions/apply5.d.ts.map | 1 - .../lib/generated/instructions/apply5.js | 131 ------------ .../lib/generated/instructions/apply5.js.map | 1 - .../lib/generated/instructions/index.d.ts | 10 - .../lib/generated/instructions/index.d.ts.map | 1 - .../lib/generated/instructions/index.js | 26 --- .../lib/generated/instructions/index.js.map | 1 - .../instructions/initializeComponent.d.ts | 18 -- .../instructions/initializeComponent.d.ts.map | 1 - .../instructions/initializeComponent.js | 90 -------- .../instructions/initializeComponent.js.map | 1 - .../instructions/initializeNewWorld.d.ts | 15 -- .../instructions/initializeNewWorld.d.ts.map | 1 - .../instructions/initializeNewWorld.js | 75 ------- .../instructions/initializeNewWorld.js.map | 1 - .../instructions/initializeRegistry.d.ts | 14 -- .../instructions/initializeRegistry.d.ts.map | 1 - .../instructions/initializeRegistry.js | 70 ------- .../instructions/initializeRegistry.js.map | 1 - clients/bolt-sdk/lib/index.d.ts | 15 -- clients/bolt-sdk/lib/index.d.ts.map | 1 - clients/bolt-sdk/lib/index.js | 78 ------- clients/bolt-sdk/lib/index.js.map | 1 - clients/bolt-sdk/lib/world/transactions.d.ts | 51 ----- .../bolt-sdk/lib/world/transactions.d.ts.map | 1 - clients/bolt-sdk/lib/world/transactions.js | 198 ------------------ .../bolt-sdk/lib/world/transactions.js.map | 1 - tests/bolt.ts | 171 +++++---------- 85 files changed, 50 insertions(+), 2604 deletions(-) delete mode 100644 clients/bolt-sdk/lib/delegation/accounts.d.ts delete mode 100644 clients/bolt-sdk/lib/delegation/accounts.d.ts.map delete mode 100644 clients/bolt-sdk/lib/delegation/accounts.js delete mode 100644 clients/bolt-sdk/lib/delegation/accounts.js.map delete mode 100644 clients/bolt-sdk/lib/delegation/delegate.d.ts delete mode 100644 clients/bolt-sdk/lib/delegation/delegate.d.ts.map delete mode 100644 clients/bolt-sdk/lib/delegation/delegate.js delete mode 100644 clients/bolt-sdk/lib/delegation/delegate.js.map delete mode 100644 clients/bolt-sdk/lib/delegation/undelegate.d.ts delete mode 100644 clients/bolt-sdk/lib/delegation/undelegate.d.ts.map delete mode 100644 clients/bolt-sdk/lib/delegation/undelegate.js delete mode 100644 clients/bolt-sdk/lib/delegation/undelegate.js.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.js delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Entity.js.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.js delete mode 100644 clients/bolt-sdk/lib/generated/accounts/Registry.js.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/World.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/accounts/World.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/World.js delete mode 100644 clients/bolt-sdk/lib/generated/accounts/World.js.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/index.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/accounts/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/accounts/index.js delete mode 100644 clients/bolt-sdk/lib/generated/accounts/index.js.map delete mode 100644 clients/bolt-sdk/lib/generated/errors/index.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/errors/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/errors/index.js delete mode 100644 clients/bolt-sdk/lib/generated/errors/index.js.map delete mode 100644 clients/bolt-sdk/lib/generated/index.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/index.js delete mode 100644 clients/bolt-sdk/lib/generated/index.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/addEntity.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply2.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply3.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply4.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/apply5.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/index.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/index.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/index.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js delete mode 100644 clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map delete mode 100644 clients/bolt-sdk/lib/index.d.ts delete mode 100644 clients/bolt-sdk/lib/index.d.ts.map delete mode 100644 clients/bolt-sdk/lib/index.js delete mode 100644 clients/bolt-sdk/lib/index.js.map delete mode 100644 clients/bolt-sdk/lib/world/transactions.d.ts delete mode 100644 clients/bolt-sdk/lib/world/transactions.d.ts.map delete mode 100644 clients/bolt-sdk/lib/world/transactions.js delete mode 100644 clients/bolt-sdk/lib/world/transactions.js.map diff --git a/clients/bolt-sdk/lib/delegation/accounts.d.ts b/clients/bolt-sdk/lib/delegation/accounts.d.ts deleted file mode 100644 index b12885e..0000000 --- a/clients/bolt-sdk/lib/delegation/accounts.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -export declare const DELEGATION_PROGRAM_ID = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; -export declare function getDelegationAccounts(accountToDelegate: PublicKey, ownerProgram: PublicKey, ownedBuffer?: boolean): { - delegationPda: PublicKey; - delegatedAccountSeedsPda: PublicKey; - bufferPda: PublicKey; - commitStateRecordPda: PublicKey; - commitStatePda: PublicKey; -}; -//# sourceMappingURL=accounts.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.d.ts.map b/clients/bolt-sdk/lib/delegation/accounts.d.ts.map deleted file mode 100644 index f5336b0..0000000 --- a/clients/bolt-sdk/lib/delegation/accounts.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/delegation/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,eAAO,MAAM,qBAAqB,iDACc,CAAC;AAEjD,wBAAgB,qBAAqB,CACnC,iBAAiB,EAAE,SAAS,EAC5B,YAAY,EAAE,SAAS,EACvB,WAAW,GAAE,OAAc;;;;;;EAqC5B"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.js b/clients/bolt-sdk/lib/delegation/accounts.js deleted file mode 100644 index 393bce6..0000000 --- a/clients/bolt-sdk/lib/delegation/accounts.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getDelegationAccounts = exports.DELEGATION_PROGRAM_ID = void 0; -var web3_js_1 = require("@solana/web3.js"); -var SEED_BUFFER_PDA = "buffer"; -var SEED_DELEGATION_PDA = "delegation"; -var DELEGATED_ACCOUNT_SEEDS = "account-seeds"; -var SEED_COMMIT_STATE_RECORD_PDA = "commit-state-record"; -var SEED_STATE_DIFF_PDA = "state-diff"; -exports.DELEGATION_PROGRAM_ID = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"; -function getDelegationAccounts(accountToDelegate, ownerProgram, ownedBuffer) { - if (ownedBuffer === void 0) { ownedBuffer = true; } - var pdaBytes = accountToDelegate.toBytes(); - var delegationPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_DELEGATION_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; - var delegatedAccountSeedsPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(DELEGATED_ACCOUNT_SEEDS), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; - var bufferPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_BUFFER_PDA), pdaBytes], ownedBuffer - ? new web3_js_1.PublicKey(ownerProgram) - : new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; - var commitStateRecordPda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_COMMIT_STATE_RECORD_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; - var commitStatePda = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(SEED_STATE_DIFF_PDA), pdaBytes], new web3_js_1.PublicKey(exports.DELEGATION_PROGRAM_ID))[0]; - return { - delegationPda: delegationPda, - delegatedAccountSeedsPda: delegatedAccountSeedsPda, - bufferPda: bufferPda, - commitStateRecordPda: commitStateRecordPda, - commitStatePda: commitStatePda, - }; -} -exports.getDelegationAccounts = getDelegationAccounts; -//# sourceMappingURL=accounts.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/accounts.js.map b/clients/bolt-sdk/lib/delegation/accounts.js.map deleted file mode 100644 index bc77c6e..0000000 --- a/clients/bolt-sdk/lib/delegation/accounts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/delegation/accounts.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAE5C,IAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,IAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,IAAM,uBAAuB,GAAG,eAAe,CAAC;AAChD,IAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAC3D,IAAM,mBAAmB,GAAG,YAAY,CAAC;AAC5B,QAAA,qBAAqB,GAChC,8CAA8C,CAAC;AAEjD,SAAgB,qBAA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"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.d.ts b/clients/bolt-sdk/lib/delegation/delegate.d.ts deleted file mode 100644 index 69804f7..0000000 --- a/clients/bolt-sdk/lib/delegation/delegate.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface DelegateInstructionArgs { - validUntil: beet.bignum; - commitFrequencyMs: number; -} -export declare const delegateStruct: beet.FixableBeetArgsStruct; -export interface DelegateInstructionAccounts { - payer: web3.PublicKey; - entity: web3.PublicKey; - account: web3.PublicKey; - ownerProgram: web3.PublicKey; - buffer?: web3.PublicKey; - delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; - delegationProgram?: web3.PublicKey; - systemProgram?: web3.PublicKey; -} -export declare const delegateInstructionDiscriminator: number[]; -export declare function createDelegateInstruction(accounts: DelegateInstructionAccounts, validUntil?: beet.bignum, commitFrequencyMs?: number, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=delegate.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.d.ts.map b/clients/bolt-sdk/lib/delegation/delegate.d.ts.map deleted file mode 100644 index 576f437..0000000 --- a/clients/bolt-sdk/lib/delegation/delegate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/delegation/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;8BAEG,MAAM,EAAE;EASrC,CAAC;AAOF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,gCAAgC,UAE5C,CAAC;AAMF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,UAAU,GAAE,IAAI,CAAC,MAAU,EAC3B,iBAAiB,GAAE,MAAc,EACjC,SAAS,iBAAwB,+BAiElC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.js b/clients/bolt-sdk/lib/delegation/delegate.js deleted file mode 100644 index cf25621..0000000 --- a/clients/bolt-sdk/lib/delegation/delegate.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createDelegateInstruction = exports.delegateInstructionDiscriminator = exports.delegateStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var accounts_1 = require("./accounts"); -exports.delegateStruct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["validUntil", beet.i64], - ["commitFrequencyMs", beet.u32], -], "DelegateInstructionArgs"); -exports.delegateInstructionDiscriminator = [ - 90, 147, 75, 178, 85, 88, 4, 137, -]; -function createDelegateInstruction(accounts, validUntil, commitFrequencyMs, programId) { - var _a, _b, _c, _d, _e; - if (validUntil === void 0) { validUntil = 0; } - if (commitFrequencyMs === void 0) { commitFrequencyMs = 30000; } - if (programId === void 0) { programId = accounts.ownerProgram; } - var data = exports.delegateStruct.serialize({ - instructionDiscriminator: exports.delegateInstructionDiscriminator, - validUntil: validUntil, - commitFrequencyMs: commitFrequencyMs, - })[0]; - var _f = (0, accounts_1.getDelegationAccounts)(accounts.account, accounts.ownerProgram), delegationPda = _f.delegationPda, delegatedAccountSeedsPda = _f.delegatedAccountSeedsPda, bufferPda = _f.bufferPda; - var keys = [ - { - pubkey: accounts.payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: accounts.entity, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.account, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.ownerProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_b = accounts.delegationRecord) !== null && _b !== void 0 ? _b : delegationPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_c = accounts.delegateAccountSeeds) !== null && _c !== void 0 ? _c : delegatedAccountSeedsPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_d = accounts.delegationProgram) !== null && _d !== void 0 ? _d : new web3.PublicKey(accounts_1.DELEGATION_PROGRAM_ID), - isWritable: false, - isSigner: false, - }, - { - pubkey: (_e = accounts.systemProgram) !== null && _e !== void 0 ? _e : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - return new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); -} -exports.createDelegateInstruction = createDelegateInstruction; -//# sourceMappingURL=delegate.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/delegate.js.map b/clients/bolt-sdk/lib/delegation/delegate.js.map deleted file mode 100644 index be24f37..0000000 --- a/clients/bolt-sdk/lib/delegation/delegate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/delegation/delegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,oDAAwC;AACxC,uCAA0E;AAO7D,QAAA,cAAc,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAK1D;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG,CAAC;CAChC,EACD,yBAAyB,CAC1B,CAAC;AAmBW,QAAA,gCAAgC,GAAG;IAC9C,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG;CACjC,CAAC;AAMF,SAAgB,yBAAyB,CACvC,QAAqC,EACrC,UAA2B,EAC3B,iBAAiC,EACjC,SAAiC;;IAFjC,2BAAA,EAAA,cAA2B;IAC3B,kCAAA,EAAA,yBAAiC;IACjC,0BAAA,EAAA,YAAY,QAAQ,CAAC,YAAY;IAE1B,IAAA,IAAI,GAAI,sBAAc,CAAC,SAAS,CAAC;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AC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AArED,8DAqEC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.d.ts b/clients/bolt-sdk/lib/delegation/undelegate.d.ts deleted file mode 100644 index 03257c3..0000000 --- a/clients/bolt-sdk/lib/delegation/undelegate.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const undelegateStruct: beet.FixableBeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface UndelegateInstructionAccounts { - payer: web3.PublicKey; - delegatedAccount: web3.PublicKey; - ownerProgram: web3.PublicKey; - buffer?: web3.PublicKey; - commitStatePda?: web3.PublicKey; - commitStateRecordPda?: web3.PublicKey; - delegationRecord?: web3.PublicKey; - delegateAccountSeeds?: web3.PublicKey; - reimbursement: web3.PublicKey; - systemProgram?: web3.PublicKey; -} -export declare const undelegateInstructionDiscriminator: number[]; -export declare function createUndelegateInstruction(accounts: UndelegateInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=undelegate.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map b/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map deleted file mode 100644 index 7a0c347..0000000 --- a/clients/bolt-sdk/lib/delegation/undelegate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"undelegate.d.ts","sourceRoot":"","sources":["../../src/delegation/undelegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,eAAO,MAAM,gBAAgB;8BACD,MAAM,EAAE;EAInC,CAAC;AAMF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAChC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,kCAAkC,UAA2B,CAAC;AAO3E,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,6BAA6B,EACvC,SAAS,iBAAuC,+BA4EjD"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.js b/clients/bolt-sdk/lib/delegation/undelegate.js deleted file mode 100644 index 2005625..0000000 --- a/clients/bolt-sdk/lib/delegation/undelegate.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createUndelegateInstruction = exports.undelegateInstructionDiscriminator = exports.undelegateStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var accounts_1 = require("./accounts"); -var web3_js_1 = require("@solana/web3.js"); -exports.undelegateStruct = new beet.FixableBeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "UndelegateInstructionArgs"); -exports.undelegateInstructionDiscriminator = [3, 0, 0, 0, 0, 0, 0, 0]; -function createUndelegateInstruction(accounts, programId) { - var _a, _b, _c, _d, _e, _f; - if (programId === void 0) { programId = new web3_js_1.PublicKey(accounts_1.DELEGATION_PROGRAM_ID); } - var data = exports.undelegateStruct.serialize({ - instructionDiscriminator: exports.undelegateInstructionDiscriminator, - })[0]; - var _g = (0, accounts_1.getDelegationAccounts)(accounts.delegatedAccount, accounts.ownerProgram, false), delegationPda = _g.delegationPda, delegatedAccountSeedsPda = _g.delegatedAccountSeedsPda, bufferPda = _g.bufferPda, commitStateRecordPda = _g.commitStateRecordPda, commitStatePda = _g.commitStatePda; - var keys = [ - { - pubkey: accounts.payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: accounts.delegatedAccount, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.ownerProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_a = accounts.buffer) !== null && _a !== void 0 ? _a : bufferPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_b = accounts.commitStatePda) !== null && _b !== void 0 ? _b : commitStatePda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_c = accounts.commitStateRecordPda) !== null && _c !== void 0 ? _c : commitStateRecordPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_d = accounts.delegationRecord) !== null && _d !== void 0 ? _d : delegationPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_e = accounts.delegateAccountSeeds) !== null && _e !== void 0 ? _e : delegatedAccountSeedsPda, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.reimbursement, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_f = accounts.systemProgram) !== null && _f !== void 0 ? _f : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - return new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); -} -exports.createUndelegateInstruction = createUndelegateInstruction; -//# sourceMappingURL=undelegate.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/delegation/undelegate.js.map b/clients/bolt-sdk/lib/delegation/undelegate.js.map deleted file mode 100644 index 844692e..0000000 --- a/clients/bolt-sdk/lib/delegation/undelegate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"undelegate.js","sourceRoot":"","sources":["../../src/delegation/undelegate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAkD;AAClD,oDAAwC;AACxC,uCAA0E;AAC1E,2CAA4C;AAE/B,QAAA,gBAAgB,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAG5D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,2BAA2B,CAC5B,CAAC;AAmBW,QAAA,kCAAkC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAO3E,SAAgB,2BAA2B,CACzC,QAAuC,EACvC,SAAgD;;IAAhD,0BAAA,EAAA,gBAAgB,mBAAS,CAAC,gCAAqB,CAAC;IAEzC,IAAA,IAAI,GAAI,wBAAgB,CAAC,SAAS,CAAC;QACxC,w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QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACrC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;AACL,CAAC;AA9ED,kEA8EC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts deleted file mode 100644 index bb532ae..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface EntityArgs { - id: beet.bignum; -} -export declare const entityDiscriminator: number[]; -export declare class Entity implements EntityArgs { - readonly id: beet.bignum; - private constructor(); - static fromArgs(args: EntityArgs): Entity; - static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [Entity, number]; - static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - id: any; - accountDiscriminator: any; - }>; - static deserialize(buf: Buffer, offset?: number): [Entity, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - id: number | { - toNumber: () => number; - }; - }; -} -export declare const entityBeet: beet.BeetStruct; -//# sourceMappingURL=Entity.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map deleted file mode 100644 index f153ac6..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Entity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,UAAuC,CAAC;AAQxE,qBAAa,MAAO,YAAW,UAAU;IACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM;IAA5C,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;IAQhC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,MAAM,EAAE,MAAM,CAAC;WAUN,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,MAAM,CAAC;IAiBlB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ7D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;CAYpD;AAMD,eAAO,MAAM,UAAU;0BAGG,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.js b/clients/bolt-sdk/lib/generated/accounts/Entity.js deleted file mode 100644 index c100572..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Entity.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.entityBeet = exports.Entity = exports.entityDiscriminator = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.entityDiscriminator = [46, 157, 161, 161, 254, 46, 79, 24]; -var Entity = (function () { - function Entity(id) { - this.id = id; - } - Entity.fromArgs = function (args) { - return new Entity(args.id); - }; - Entity.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { offset = 0; } - return Entity.deserialize(accountInfo.data, offset); - }; - Entity.fromAccountAddress = function (connection, address, commitmentOrConfig) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error("Unable to find Entity account at ".concat(address)); - } - return [2, Entity.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - Entity.gpaBuilder = function (programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - return beetSolana.GpaBuilder.fromStruct(programId, exports.entityBeet); - }; - Entity.deserialize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return exports.entityBeet.deserialize(buf, offset); - }; - Entity.prototype.serialize = function () { - return exports.entityBeet.serialize(__assign({ accountDiscriminator: exports.entityDiscriminator }, this)); - }; - Object.defineProperty(Entity, "byteSize", { - get: function () { - return exports.entityBeet.byteSize; - }, - enumerable: false, - configurable: true - }); - Entity.getMinimumBalanceForRentExemption = function (connection, commitment) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, connection.getMinimumBalanceForRentExemption(Entity.byteSize, commitment)]; - }); - }); - }; - Entity.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return buf.byteLength - offset === Entity.byteSize; - }; - Entity.prototype.pretty = function () { - var _this = this; - return { - id: (function () { - var x = _this.id; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } - catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return Entity; -}()); -exports.Entity = Entity; -exports.entityBeet = new beet.BeetStruct([ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["id", beet.u64], -], Entity.fromArgs, "Entity"); -//# sourceMappingURL=Entity.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Entity.js.map b/clients/bolt-sdk/lib/generated/accounts/Entity.js.map deleted file mode 100644 index f7a7a12..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Entity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../../src/generated/accounts/Entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAWlD,QAAA,mBAAmB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAQxE;IACE,gBAA6B,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;IAAG,CAAC;IAKzC,eAAQ,GAAf,UAAgB,IAAgB;QAC9B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAMM,sBAAe,GAAtB,UACE,WAAqC,EACrC,MAAU;QAAV,uBAAA,EAAA,UAAU;QAEV,OAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAQY,yBAAkB,GAA/B,UACE,UAA2B,EAC3B,OAAuB,EACvB,kBAAgE;;;;;4BAE5C,WAAM,UAAU,CAAC,cAAc,CACjD,OAAO,EACP,kBAAkB,CACnB,EAAA;;wBAHK,WAAW,GAAG,SAGnB;wBACD,IAAI,WAAW,IAAI,IAAI,EAAE;4BACvB,MAAM,IAAI,KAAK,CAAC,2C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;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,wBAAM;AAoIN,QAAA,UAAU,GAAG,IAAI,IAAI,CAAC,UAAU,CAM3C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;CACjB,EACD,MAAM,CAAC,QAAQ,EACf,QAAQ,CACT,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts deleted file mode 100644 index 7fe25a4..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface RegistryArgs { - worlds: beet.bignum; -} -export declare const registryDiscriminator: number[]; -export declare class Registry implements RegistryArgs { - readonly worlds: beet.bignum; - private constructor(); - static fromArgs(args: RegistryArgs): Registry; - static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [Registry, number]; - static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - accountDiscriminator: any; - worlds: any; - }>; - static deserialize(buf: Buffer, offset?: number): [Registry, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - worlds: number | { - toNumber: () => number; - }; - }; -} -export declare const registryBeet: beet.BeetStruct; -//# sourceMappingURL=Registry.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map deleted file mode 100644 index bebd9f9..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Registry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/Registry.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,UAA0C,CAAC;AAQ7E,qBAAa,QAAS,YAAW,YAAY;IACvB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM;IAAhD,OAAO;IAKP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY;IAQlC,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,QAAQ,EAAE,MAAM,CAAC;WAUR,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,QAAQ,CAAC;IAiBpB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;IAQ/D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGqC,MAAM,MAAM;;;CAYxD;AAMD,eAAO,MAAM,YAAY;0BAGC,MAAM,EAAE;EASjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.js b/clients/bolt-sdk/lib/generated/accounts/Registry.js deleted file mode 100644 index 8f79e2d..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Registry.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.registryBeet = exports.Registry = exports.registryDiscriminator = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.registryDiscriminator = [47, 174, 110, 246, 184, 182, 252, 218]; -var Registry = (function () { - function Registry(worlds) { - this.worlds = worlds; - } - Registry.fromArgs = function (args) { - return new Registry(args.worlds); - }; - Registry.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { offset = 0; } - return Registry.deserialize(accountInfo.data, offset); - }; - Registry.fromAccountAddress = function (connection, address, commitmentOrConfig) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error("Unable to find Registry account at ".concat(address)); - } - return [2, Registry.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - Registry.gpaBuilder = function (programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - return beetSolana.GpaBuilder.fromStruct(programId, exports.registryBeet); - }; - Registry.deserialize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return exports.registryBeet.deserialize(buf, offset); - }; - Registry.prototype.serialize = function () { - return exports.registryBeet.serialize(__assign({ accountDiscriminator: exports.registryDiscriminator }, this)); - }; - Object.defineProperty(Registry, "byteSize", { - get: function () { - return exports.registryBeet.byteSize; - }, - enumerable: false, - configurable: true - }); - Registry.getMinimumBalanceForRentExemption = function (connection, commitment) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, connection.getMinimumBalanceForRentExemption(Registry.byteSize, commitment)]; - }); - }); - }; - Registry.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return buf.byteLength - offset === Registry.byteSize; - }; - Registry.prototype.pretty = function () { - var _this = this; - return { - worlds: (function () { - var x = _this.worlds; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } - catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return Registry; -}()); -exports.Registry = Registry; -exports.registryBeet = new beet.BeetStruct([ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["worlds", beet.u64], -], Registry.fromArgs, "Registry"); -//# sourceMappingURL=Registry.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/Registry.js.map b/clients/bolt-sdk/lib/generated/accounts/Registry.js.map deleted file mode 100644 index eb8915a..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/Registry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Registry.js","sourceRoot":"","sources":["../../../src/generated/accounts/Registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAWlD,QAAA,qBAAqB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAQ7E;IACE,kBAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAK7C,iBAAQ,GAAf,UAAgB,IAAkB;QAChC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAMM,wBAAe,GAAtB,UACE,WAAqC,EACrC,MAAU;QAAV,uBAAA,EAAA,UAAU;QAEV,OAAO,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAQY,2BAAkB,GAA/B,UACE,UAA2B,EAC3B,OAAuB,EACvB,kBAAgE;;;;;4BAE5C,WAAM,UAAU,CAAC,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C;gBACpD,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACpC,IAAI;wBACF,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACrB;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,CAAC;qBACV;iBACF;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IACH,eAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,4BAAQ;AAoIR,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,UAAU,CAM7C;IACE,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC;CACrB,EACD,QAAQ,CAAC,QAAQ,EACjB,UAAU,CACX,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.d.ts b/clients/bolt-sdk/lib/generated/accounts/World.d.ts deleted file mode 100644 index 4d0c2e2..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/World.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -import * as beetSolana from "@metaplex-foundation/beet-solana"; -export interface WorldArgs { - id: beet.bignum; - entities: beet.bignum; -} -export declare const worldDiscriminator: number[]; -export declare class World implements WorldArgs { - readonly id: beet.bignum; - readonly entities: beet.bignum; - private constructor(); - static fromArgs(args: WorldArgs): World; - static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [World, number]; - static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise; - static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{ - id: any; - accountDiscriminator: any; - entities: any; - }>; - static deserialize(buf: Buffer, offset?: number): [World, number]; - serialize(): [Buffer, number]; - static get byteSize(): number; - static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise; - static hasCorrectByteSize(buf: Buffer, offset?: number): boolean; - pretty(): { - id: number | { - toNumber: () => number; - }; - entities: number | { - toNumber: () => number; - }; - }; -} -export declare const worldBeet: beet.BeetStruct; -//# sourceMappingURL=World.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map deleted file mode 100644 index d83695c..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/World.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"World.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/World.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAO/D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,UAAyC,CAAC;AAQzE,qBAAa,KAAM,YAAW,SAAS;IAEnC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM;IACxB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM;IAFhC,OAAO;IAQP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS;IAQ/B,MAAM,CAAC,eAAe,CACpB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EACrC,MAAM,SAAI,GACT,CAAC,KAAK,EAAE,MAAM,CAAC;WAUL,kBAAkB,CAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oBAAoB,GAC/D,OAAO,CAAC,KAAK,CAAC;IAiBjB,MAAM,CAAC,UAAU,CACf,SAAS,GAAE,IAAI,CAAC,SAEf;;;;;IASH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;IAQ5D,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAW7B,MAAM,KAAK,QAAQ,WAElB;WAQY,iCAAiC,CAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAC3B,OAAO,CAAC,MAAM,CAAC;IAWlB,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI;IAQjD,MAAM;;sBAGiC,MAAM,MAAM;;;sBAWN,MAAM,MAAM;;;CAY1D;AAMD,eAAO,MAAM,SAAS;0BAGI,MAAM,EAAE;EAUjC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.js b/clients/bolt-sdk/lib/generated/accounts/World.js deleted file mode 100644 index 4b6afd0..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/World.js +++ /dev/null @@ -1,172 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.worldBeet = exports.World = exports.worldDiscriminator = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -var beetSolana = __importStar(require("@metaplex-foundation/beet-solana")); -exports.worldDiscriminator = [145, 45, 170, 174, 122, 32, 155, 124]; -var World = (function () { - function World(id, entities) { - this.id = id; - this.entities = entities; - } - World.fromArgs = function (args) { - return new World(args.id, args.entities); - }; - World.fromAccountInfo = function (accountInfo, offset) { - if (offset === void 0) { offset = 0; } - return World.deserialize(accountInfo.data, offset); - }; - World.fromAccountAddress = function (connection, address, commitmentOrConfig) { - return __awaiter(this, void 0, void 0, function () { - var accountInfo; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4, connection.getAccountInfo(address, commitmentOrConfig)]; - case 1: - accountInfo = _a.sent(); - if (accountInfo == null) { - throw new Error("Unable to find World account at ".concat(address)); - } - return [2, World.fromAccountInfo(accountInfo, 0)[0]]; - } - }); - }); - }; - World.gpaBuilder = function (programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - return beetSolana.GpaBuilder.fromStruct(programId, exports.worldBeet); - }; - World.deserialize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return exports.worldBeet.deserialize(buf, offset); - }; - World.prototype.serialize = function () { - return exports.worldBeet.serialize(__assign({ accountDiscriminator: exports.worldDiscriminator }, this)); - }; - Object.defineProperty(World, "byteSize", { - get: function () { - return exports.worldBeet.byteSize; - }, - enumerable: false, - configurable: true - }); - World.getMinimumBalanceForRentExemption = function (connection, commitment) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, connection.getMinimumBalanceForRentExemption(World.byteSize, commitment)]; - }); - }); - }; - World.hasCorrectByteSize = function (buf, offset) { - if (offset === void 0) { offset = 0; } - return buf.byteLength - offset === World.byteSize; - }; - World.prototype.pretty = function () { - var _this = this; - return { - id: (function () { - var x = _this.id; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } - catch (_) { - return x; - } - } - return x; - })(), - entities: (function () { - var x = _this.entities; - if (typeof x.toNumber === "function") { - try { - return x.toNumber(); - } - catch (_) { - return x; - } - } - return x; - })(), - }; - }; - return World; -}()); -exports.World = World; -exports.worldBeet = new beet.BeetStruct([ - ["accountDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["id", beet.u64], - ["entities", beet.u64], -], World.fromArgs, "World"); -//# sourceMappingURL=World.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/World.js.map b/clients/bolt-sdk/lib/generated/accounts/World.js.map deleted file mode 100644 index 8df46fa..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/World.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"World.js","sourceRoot":"","sources":["../../../src/generated/accounts/World.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AACxC,2EAA+D;AAYlD,QAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAQzE;IACE,eACW,EAAe,EACf,QAAqB;QADrB,OAAE,GAAF,EAAE,CAAa;QACf,aAAQ,GAAR,QAAQ,CAAa;IAC7B,CAAC;IAKG,cAAQ,GAAf,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AAK,CAAC,QAAQ,EACd,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.d.ts b/clients/bolt-sdk/lib/generated/accounts/index.d.ts deleted file mode 100644 index 3bc3fe7..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Entity } from "./Entity"; -import { Registry } from "./Registry"; -import { World } from "./World"; -export * from "./Entity"; -export * from "./Registry"; -export * from "./World"; -export declare const accountProviders: { - Entity: typeof Entity; - Registry: typeof Registry; - World: typeof World; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map b/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map deleted file mode 100644 index 18c003d..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;CAA8B,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.js b/clients/bolt-sdk/lib/generated/accounts/index.js deleted file mode 100644 index 8ba05cd..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.accountProviders = void 0; -var Entity_1 = require("./Entity"); -var Registry_1 = require("./Registry"); -var World_1 = require("./World"); -__exportStar(require("./Entity"), exports); -__exportStar(require("./Registry"), exports); -__exportStar(require("./World"), exports); -exports.accountProviders = { Entity: Entity_1.Entity, Registry: Registry_1.Registry, World: World_1.World }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/accounts/index.js.map b/clients/bolt-sdk/lib/generated/accounts/index.js.map deleted file mode 100644 index 879d1a1..0000000 --- a/clients/bolt-sdk/lib/generated/accounts/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,mCAAkC;AAClC,uCAAsC;AACtC,iCAAgC;AAEhC,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AAEX,QAAA,gBAAgB,GAAG,EAAE,MAAM,iBAAA,EAAE,QAAQ,qBAAA,EAAE,KAAK,eAAA,EAAE,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.d.ts b/clients/bolt-sdk/lib/generated/errors/index.d.ts deleted file mode 100644 index 91a124f..0000000 --- a/clients/bolt-sdk/lib/generated/errors/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -type ErrorWithCode = Error & { - code: number; -}; -type MaybeErrorWithCode = ErrorWithCode | null | undefined; -export declare class InvalidAuthorityError extends Error { - readonly code: number; - readonly name: string; - constructor(); -} -export declare function errorFromCode(code: number): MaybeErrorWithCode; -export declare function errorFromName(name: string): MaybeErrorWithCode; -export {}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.d.ts.map b/clients/bolt-sdk/lib/generated/errors/index.d.ts.map deleted file mode 100644 index 62d7a04..0000000 --- a/clients/bolt-sdk/lib/generated/errors/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9C,KAAK,kBAAkB,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;AAW3D,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAsB;;CAO5C;AAaD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D;AAOD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAG9D"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.js b/clients/bolt-sdk/lib/generated/errors/index.js deleted file mode 100644 index 8c3dcce..0000000 --- a/clients/bolt-sdk/lib/generated/errors/index.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.errorFromName = exports.errorFromCode = exports.InvalidAuthorityError = void 0; -var createErrorFromCodeLookup = new Map(); -var createErrorFromNameLookup = new Map(); -var InvalidAuthorityError = (function (_super) { - __extends(InvalidAuthorityError, _super); - function InvalidAuthorityError() { - var _this = _super.call(this, "Invalid authority for instruction") || this; - _this.code = 0x1770; - _this.name = "InvalidAuthority"; - if (typeof Error.captureStackTrace === "function") { - Error.captureStackTrace(_this, InvalidAuthorityError); - } - return _this; - } - return InvalidAuthorityError; -}(Error)); -exports.InvalidAuthorityError = InvalidAuthorityError; -createErrorFromCodeLookup.set(0x1770, function () { return new InvalidAuthorityError(); }); -createErrorFromNameLookup.set("InvalidAuthority", function () { return new InvalidAuthorityError(); }); -function errorFromCode(code) { - var createError = createErrorFromCodeLookup.get(code); - return createError != null ? createError() : null; -} -exports.errorFromCode = errorFromCode; -function errorFromName(name) { - var createError = createErrorFromNameLookup.get(name); - return createError != null ? createError() : null; -} -exports.errorFromName = errorFromName; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/errors/index.js.map b/clients/bolt-sdk/lib/generated/errors/index.js.map deleted file mode 100644 index d8d57d2..0000000 --- a/clients/bolt-sdk/lib/generated/errors/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUA,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AACzE,IAAM,yBAAyB,GAAG,IAAI,GAAG,EAA+B,CAAC;AAQzE;IAA2C,yCAAK;IAG9C;QAAA,YACE,kBAAM,mCAAmC,CAAC,SAI3C;QAPQ,UAAI,GAAW,MAAM,CAAC;QACtB,UAAI,GAAW,kBAAkB,CAAC;QAGzC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,UAAU,EAAE;YACjD,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,qBAAqB,CAAC,CAAC;SACtD;;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AATD,CAA2C,KAAK,GAS/C;AATY,sDAAqB;AAWlC,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAAC,CAAC;AACzE,yBAAyB,CAAC,GAAG,CAC3B,kBAAkB,EAClB,cAAM,OAAA,IAAI,qBAAqB,EAAE,EAA3B,CAA2B,CAClC,CAAC;AAOF,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC;AAOD,SAAgB,aAAa,CAAC,IAAY;IACxC,IAAM,WAAW,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAHD,sCAGC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.d.ts b/clients/bolt-sdk/lib/generated/index.d.ts deleted file mode 100644 index 5cdd83b..0000000 --- a/clients/bolt-sdk/lib/generated/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -export * from "./accounts"; -export * from "./errors"; -export * from "./instructions"; -export declare const PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; -export declare const PROGRAM_ID: PublicKey; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.d.ts.map b/clients/bolt-sdk/lib/generated/index.d.ts.map deleted file mode 100644 index d2ca8ae..0000000 --- a/clients/bolt-sdk/lib/generated/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAQ/B,eAAO,MAAM,eAAe,gDAAgD,CAAC;AAQ7E,eAAO,MAAM,UAAU,WAAiC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.js b/clients/bolt-sdk/lib/generated/index.js deleted file mode 100644 index d664ce7..0000000 --- a/clients/bolt-sdk/lib/generated/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROGRAM_ID = exports.PROGRAM_ADDRESS = void 0; -var web3_js_1 = require("@solana/web3.js"); -__exportStar(require("./accounts"), exports); -__exportStar(require("./errors"), exports); -__exportStar(require("./instructions"), exports); -exports.PROGRAM_ADDRESS = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"; -exports.PROGRAM_ID = new web3_js_1.PublicKey(exports.PROGRAM_ADDRESS); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/index.js.map b/clients/bolt-sdk/lib/generated/index.js.map deleted file mode 100644 index 09ef7e5..0000000 --- a/clients/bolt-sdk/lib/generated/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,2CAA4C;AAC5C,6CAA2B;AAC3B,2CAAyB;AACzB,iDAA+B;AAQlB,QAAA,eAAe,GAAG,6CAA6C,CAAC;AAQhE,QAAA,UAAU,GAAG,IAAI,mBAAS,CAAC,uBAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts deleted file mode 100644 index f52b6b6..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface AddEntityInstructionArgs { - extraSeed: beet.COption; -} -export declare const addEntityStruct: beet.FixableBeetArgsStruct; -export interface AddEntityInstructionAccounts { - payer: web3.PublicKey; - entity: web3.PublicKey; - world: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const addEntityInstructionDiscriminator: number[]; -export declare function createAddEntityInstruction(accounts: AddEntityInstructionAccounts, args: AddEntityInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=addEntity.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map deleted file mode 100644 index a47ff1a..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/addEntity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"addEntity.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC;AAMD,eAAO,MAAM,eAAe;8BAEE,MAAM,EAAE;EAQrC,CAAC;AAWF,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,iCAAiC,UAE7C,CAAC;AAYF,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,4BAA4B,EACtC,IAAI,EAAE,wBAAwB,EAC9B,SAAS,iBAAoE,+BAyC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.js b/clients/bolt-sdk/lib/generated/instructions/addEntity.js deleted file mode 100644 index c57e095..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/addEntity.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createAddEntityInstruction = exports.addEntityInstructionDiscriminator = exports.addEntityStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.addEntityStruct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["extraSeed", beet.coption(beet.utf8String)], -], "AddEntityInstructionArgs"); -exports.addEntityInstructionDiscriminator = [ - 163, 241, 57, 35, 244, 244, 48, 57, -]; -function createAddEntityInstruction(accounts, args, programId) { - var _a; - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.addEntityStruct.serialize(__assign({ instructionDiscriminator: exports.addEntityInstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: accounts.entity, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.world, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createAddEntityInstruction = createAddEntityInstruction; -//# sourceMappingURL=addEntity.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map b/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map deleted file mode 100644 index 12ca8ea..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/addEntity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"addEntity.js","sourceRoot":"","sources":["../../../src/generated/instructions/addEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,eAAe,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAK3D;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;CAC7C,EACD,0BAA0B,CAC3B,CAAC;AAmBW,QAAA,iCAAiC,GAAG;IAC/C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CACnC,CAAC;AAYF,SAAgB,0BAA0B,CACxC,QAAsC,EACtC,IAA8B,EAC9B,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,uBAAe,CAAC,SAAS,YACtC,wBAAwB,EAAE,yCAAiC,IACxD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA5CD,gEA4CC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts deleted file mode 100644 index c6bfd94..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface ApplyInstructionArgs { - args: Uint8Array; -} -export declare const applyStruct: beet.FixableBeetArgsStruct; -export interface ApplyInstructionAccounts { - componentProgram: web3.PublicKey; - boltSystem: web3.PublicKey; - boltComponent: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const applyInstructionDiscriminator: number[]; -export declare function createApplyInstruction(accounts: ApplyInstructionAccounts, args: ApplyInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=apply.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map deleted file mode 100644 index 55a04cb..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,WAAW;8BAEM,MAAM,EAAE;EAQrC,CAAC;AAaF,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;IAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,6BAA6B,UAEzC,CAAC;AAYF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,oBAAoB,EAC1B,SAAS,iBAAoE,+BA8C9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.js b/clients/bolt-sdk/lib/generated/instructions/apply.js deleted file mode 100644 index b881cda..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApplyInstruction = exports.applyInstructionDiscriminator = exports.applyStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.applyStruct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], -], "ApplyInstructionArgs"); -exports.applyInstructionDiscriminator = [ - 248, 243, 145, 24, 105, 50, 162, 225, -]; -function createApplyInstruction(accounts, args, programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.applyStruct.serialize(__assign({ instructionDiscriminator: exports.applyInstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.componentProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { - var acc = _a[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApplyInstruction = createApplyInstruction; -//# sourceMappingURL=apply.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply.js.map b/clients/bolt-sdk/lib/generated/instructions/apply.js.map deleted file mode 100644 index 9125d9b..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,WAAW,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKvD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,sBAAsB,CACvB,CAAC;AAsBW,QAAA,6BAA6B,GAAG;IAC3C,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG;CACrC,CAAC;AAYF,SAAgB,sBAAsB,CACpC,QAAkC,EAClC,IAA0B,EAC1B,SAA6E;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,mBAAW,CAAC,SAAS,YAClC,wBAAwB,EAAE,qCAA6B,IACpD,IAAI,EACP,GAHS,CAGR;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,gBAAgB;YACjC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,UAAU;YAC3B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,aAAa;YAC9B,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AAjDD,wDAiDC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts deleted file mode 100644 index a8545d6..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply2InstructionArgs { - args: Uint8Array; -} -export declare const apply2Struct: beet.FixableBeetArgsStruct; -export interface Apply2InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply2InstructionDiscriminator: number[]; -export declare function createApply2Instruction(accounts: Apply2InstructionAccounts, args: Apply2InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=apply2.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map deleted file mode 100644 index 2acce74..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply2.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply2.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply2.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAeF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAwD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.js b/clients/bolt-sdk/lib/generated/instructions/apply2.js deleted file mode 100644 index 1620a43..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply2.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply2Instruction = exports.apply2InstructionDiscriminator = exports.apply2Struct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.apply2Struct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], -], "Apply2InstructionArgs"); -exports.apply2InstructionDiscriminator = [ - 120, 32, 116, 154, 158, 159, 208, 73, -]; -function createApply2Instruction(accounts, args, programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.apply2Struct.serialize(__assign({ instructionDiscriminator: exports.apply2InstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { - var acc = _a[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply2Instruction = createApply2Instruction; -//# sourceMappingURL=apply2.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply2.js.map b/clients/bolt-sdk/lib/generated/instructions/apply2.js.map deleted file mode 100644 index a84e6d5..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply2.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply2.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,M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EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA3DD,0DA2DC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts deleted file mode 100644 index 3d2d748..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply3InstructionArgs { - args: Uint8Array; -} -export declare const apply3Struct: beet.FixableBeetArgsStruct; -export interface Apply3InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply3InstructionDiscriminator: number[]; -export declare function createApply3Instruction(accounts: Apply3InstructionAccounts, args: Apply3InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=apply3.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map deleted file mode 100644 index f1414ed..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply3.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply3.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply3.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAiBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAkE9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.js b/clients/bolt-sdk/lib/generated/instructions/apply3.js deleted file mode 100644 index 6ced1f9..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply3.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply3Instruction = exports.apply3InstructionDiscriminator = exports.apply3Struct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.apply3Struct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], -], "Apply3InstructionArgs"); -exports.apply3InstructionDiscriminator = [ - 254, 146, 49, 7, 236, 131, 105, 221, -]; -function createApply3Instruction(accounts, args, programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.apply3Struct.serialize(__assign({ instructionDiscriminator: exports.apply3InstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { - var acc = _a[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply3Instruction = createApply3Instruction; -//# sourceMappingURL=apply3.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply3.js.map b/clients/bolt-sdk/lib/generated/instructions/apply3.js.map deleted file mode 100644 index 6360b43..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply3.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply3.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AA8BW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACpC,CAAC;AAYF,SAAgB,uBAAuB,CACrC,QAAmC,EACnC,IAA2B,EAC3B,SAA6E;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,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C,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AArED,0DAqEC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts deleted file mode 100644 index c1c59a7..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply4InstructionArgs { - args: Uint8Array; -} -export declare const apply4Struct: beet.FixableBeetArgsStruct; -export interface Apply4InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - componentProgram4: web3.PublicKey; - boltComponent4: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply4InstructionDiscriminator: number[]; -export declare function createApply4Instruction(accounts: Apply4InstructionAccounts, args: Apply4InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=apply4.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map deleted file mode 100644 index 7034f50..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply4.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply4.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply4.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAmBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BA4E9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.js b/clients/bolt-sdk/lib/generated/instructions/apply4.js deleted file mode 100644 index 55f0914..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply4.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply4Instruction = exports.apply4InstructionDiscriminator = exports.apply4Struct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.apply4Struct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], -], "Apply4InstructionArgs"); -exports.apply4InstructionDiscriminator = [ - 223, 104, 24, 79, 252, 196, 14, 109, -]; -function createApply4Instruction(accounts, args, programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.apply4Struct.serialize(__assign({ instructionDiscriminator: exports.apply4InstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram4, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent4, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { - var acc = _a[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply4Instruction = createApply4Instruction; -//# sourceMappingURL=apply4.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply4.js.map b/clients/bolt-sdk/lib/generated/instructions/apply4.js.map deleted file mode 100644 index e92a4d0..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply4.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply4.js","sourceRoot":"","sources":["../../../src/generated/instructions/apply4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAe3B,QAAA,YAAY,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAKxD;IACE,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;CACrB,EACD,uBAAuB,CACxB,CAAC;AAkCW,QAAA,8BAA8B,GAAG;IAC5C,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CACpC,CAA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K;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AA/ED,0DA+EC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts deleted file mode 100644 index 4914cb7..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export interface Apply5InstructionArgs { - args: Uint8Array; -} -export declare const apply5Struct: beet.FixableBeetArgsStruct; -export interface Apply5InstructionAccounts { - boltSystem: web3.PublicKey; - componentProgram1: web3.PublicKey; - boltComponent1: web3.PublicKey; - componentProgram2: web3.PublicKey; - boltComponent2: web3.PublicKey; - componentProgram3: web3.PublicKey; - boltComponent3: web3.PublicKey; - componentProgram4: web3.PublicKey; - boltComponent4: web3.PublicKey; - componentProgram5: web3.PublicKey; - boltComponent5: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const apply5InstructionDiscriminator: number[]; -export declare function createApply5Instruction(accounts: Apply5InstructionAccounts, args: Apply5InstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=apply5.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map deleted file mode 100644 index ca04e89..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply5.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply5.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/apply5.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;CAClB;AAMD,eAAO,MAAM,YAAY;8BAEK,MAAM,EAAE;EAQrC,CAAC;AAqBF,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,8BAA8B,UAE1C,CAAC;AAYF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,EAC3B,SAAS,iBAAoE,+BAsF9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.js b/clients/bolt-sdk/lib/generated/instructions/apply5.js deleted file mode 100644 index c94da90..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply5.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createApply5Instruction = exports.apply5InstructionDiscriminator = exports.apply5Struct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.apply5Struct = new beet.FixableBeetArgsStruct([ - ["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)], - ["args", beet.bytes], -], "Apply5InstructionArgs"); -exports.apply5InstructionDiscriminator = [ - 70, 164, 214, 28, 136, 116, 84, 153, -]; -function createApply5Instruction(accounts, args, programId) { - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.apply5Struct.serialize(__assign({ instructionDiscriminator: exports.apply5InstructionDiscriminator }, args))[0]; - var keys = [ - { - pubkey: accounts.boltSystem, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram1, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent1, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram2, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent2, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram3, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent3, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram4, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent4, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.componentProgram5, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.boltComponent5, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _a = accounts.anchorRemainingAccounts; _i < _a.length; _i++) { - var acc = _a[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createApply5Instruction = createApply5Instruction; -//# sourceMappingURL=apply5.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/apply5.js.map b/clients/bolt-sdk/lib/generated/instructions/apply5.js.map deleted file mode 100644 index 9fddeab..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/apply5.js.map +++ /dev/null @@ -1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0DAyFC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.d.ts b/clients/bolt-sdk/lib/generated/instructions/index.d.ts deleted file mode 100644 index ceb5fb7..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "./addEntity"; -export * from "./apply"; -export * from "./apply2"; -export * from "./apply3"; -export * from "./apply4"; -export * from "./apply5"; -export * from "./initializeComponent"; -export * from "./initializeNewWorld"; -export * from "./initializeRegistry"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map deleted file mode 100644 index a24ceda..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.js b/clients/bolt-sdk/lib/generated/instructions/index.js deleted file mode 100644 index 3228894..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./addEntity"), exports); -__exportStar(require("./apply"), exports); -__exportStar(require("./apply2"), exports); -__exportStar(require("./apply3"), exports); -__exportStar(require("./apply4"), exports); -__exportStar(require("./apply5"), exports); -__exportStar(require("./initializeComponent"), exports); -__exportStar(require("./initializeNewWorld"), exports); -__exportStar(require("./initializeRegistry"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/index.js.map b/clients/bolt-sdk/lib/generated/instructions/index.js.map deleted file mode 100644 index 939c311..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/instructions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts deleted file mode 100644 index dac15ba..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeComponentStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeComponentInstructionAccounts { - payer: web3.PublicKey; - data: web3.PublicKey; - entity: web3.PublicKey; - componentProgram: web3.PublicKey; - authority: web3.PublicKey; - instructionSysvarAccount: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeComponentInstructionDiscriminator: number[]; -export declare function createInitializeComponentInstruction(accounts: InitializeComponentInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=initializeComponent.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map deleted file mode 100644 index b6468d5..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeComponent.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,yBAAyB;8BACV,MAAM,EAAE;EAInC,CAAC;AAcF,MAAM,WAAW,sCAAsC;IACrD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;IACvB,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;IAC1B,wBAAwB,EAAE,IAAI,CAAC,SAAS,CAAC;IACzC,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,2CAA2C,UAEvD,CAAC;AAUF,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,sCAAsC,EAChD,SAAS,iBAAoE,+BAuD9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js deleted file mode 100644 index b0c862b..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeComponentInstruction = exports.initializeComponentInstructionDiscriminator = exports.initializeComponentStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.initializeComponentStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeComponentInstructionArgs"); -exports.initializeComponentInstructionDiscriminator = [ - 36, 143, 233, 113, 12, 234, 61, 30, -]; -function createInitializeComponentInstruction(accounts, programId) { - var _a; - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.initializeComponentStruct.serialize({ - instructionDiscriminator: exports.initializeComponentInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: accounts.data, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.entity, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.componentProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.authority, - isWritable: false, - isSigner: false, - }, - { - pubkey: accounts.instructionSysvarAccount, - isWritable: false, - isSigner: false, - }, - { - pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeComponentInstruction = createInitializeComponentInstruction; -//# sourceMappingURL=initializeComponent.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map deleted file mode 100644 index ba5ecc4..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeComponent.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QAAA,yBAAyB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG9D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,oCAAoC,CACrC,CAAC;AAyBW,QAAA,2CAA2C,GAAG;IACzD,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;CACnC,CAAC;AAUF,SAAgB,oCAAoC,CAClD,QAAgD,EAChD,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CA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AAE,CAAC;AACZ,CAAC;AAzDD,oFAyDC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts deleted file mode 100644 index 4f119ac..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeNewWorldStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeNewWorldInstructionAccounts { - payer: web3.PublicKey; - world: web3.PublicKey; - registry: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeNewWorldInstructionDiscriminator: number[]; -export declare function createInitializeNewWorldInstruction(accounts: InitializeNewWorldInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=initializeNewWorld.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map deleted file mode 100644 index 97e6a4f..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeNewWorld.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAWF,MAAM,WAAW,qCAAqC;IACpD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAwC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js deleted file mode 100644 index 3426afc..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeNewWorldInstruction = exports.initializeNewWorldInstructionDiscriminator = exports.initializeNewWorldStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.initializeNewWorldStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeNewWorldInstructionArgs"); -exports.initializeNewWorldInstructionDiscriminator = [ - 23, 96, 88, 194, 200, 203, 200, 98, -]; -function createInitializeNewWorldInstruction(accounts, programId) { - var _a; - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.initializeNewWorldStruct.serialize({ - instructionDiscriminator: exports.initializeNewWorldInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: accounts.world, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.registry, - isWritable: true, - isSigner: false, - }, - { - pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeNewWorldInstruction = createInitializeNewWorldInstruction; -//# sourceMappingURL=initializeNewWorld.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map deleted file mode 100644 index 92a0c10..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeNewWorld.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeNewWorld.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeNewWorld.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QAAA,wBAAwB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG7D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,mCAAmC,CACpC,CAAC;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newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts deleted file mode 100644 index 93b9ea0..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as beet from "@metaplex-foundation/beet"; -import * as web3 from "@solana/web3.js"; -export declare const initializeRegistryStruct: beet.BeetArgsStruct<{ - instructionDiscriminator: number[]; -}>; -export interface InitializeRegistryInstructionAccounts { - registry: web3.PublicKey; - payer: web3.PublicKey; - systemProgram?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -} -export declare const initializeRegistryInstructionDiscriminator: number[]; -export declare function createInitializeRegistryInstruction(accounts: InitializeRegistryInstructionAccounts, programId?: web3.PublicKey): web3.TransactionInstruction; -//# sourceMappingURL=initializeRegistry.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map deleted file mode 100644 index a22ea39..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeRegistry.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAOxC,eAAO,MAAM,wBAAwB;8BACT,MAAM,EAAE;EAInC,CAAC;AAUF,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC/B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,0CAA0C,UAEtD,CAAC;AAUF,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,iBAAoE,+BAmC9E"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js deleted file mode 100644 index 48e8009..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInitializeRegistryInstruction = exports.initializeRegistryInstructionDiscriminator = exports.initializeRegistryStruct = void 0; -var beet = __importStar(require("@metaplex-foundation/beet")); -var web3 = __importStar(require("@solana/web3.js")); -exports.initializeRegistryStruct = new beet.BeetArgsStruct([["instructionDiscriminator", beet.uniformFixedSizeArray(beet.u8, 8)]], "InitializeRegistryInstructionArgs"); -exports.initializeRegistryInstructionDiscriminator = [ - 189, 181, 20, 17, 174, 57, 249, 59, -]; -function createInitializeRegistryInstruction(accounts, programId) { - var _a; - if (programId === void 0) { programId = new web3.PublicKey("WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"); } - var data = exports.initializeRegistryStruct.serialize({ - instructionDiscriminator: exports.initializeRegistryInstructionDiscriminator, - })[0]; - var keys = [ - { - pubkey: accounts.registry, - isWritable: true, - isSigner: false, - }, - { - pubkey: accounts.payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId, - isWritable: false, - isSigner: false, - }, - ]; - if (accounts.anchorRemainingAccounts != null) { - for (var _i = 0, _b = accounts.anchorRemainingAccounts; _i < _b.length; _i++) { - var acc = _b[_i]; - keys.push(acc); - } - } - var ix = new web3.TransactionInstruction({ - programId: programId, - keys: keys, - data: data, - }); - return ix; -} -exports.createInitializeRegistryInstruction = createInitializeRegistryInstruction; -//# sourceMappingURL=initializeRegistry.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map b/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map deleted file mode 100644 index 69cf632..0000000 --- a/clients/bolt-sdk/lib/generated/instructions/initializeRegistry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeRegistry.js","sourceRoot":"","sources":["../../../src/generated/instructions/initializeRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8DAAkD;AAClD,oDAAwC;AAO3B,QAAA,wBAAwB,GAAG,IAAI,IAAI,CAAC,cAAc,CAG7D,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACtE,mCAAmC,CACpC,CAAC;AAiBW,QAAA,0CAA0C,GAAG;IACxD,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;CACnC,CAAC;AAUF,SAAgB,mCAAmC,CACjD,QAA+C,EAC/C,SAA6E;;IAA7E,0BAAA,EAAA,gBAAgB,IAAI,CAAC,SAAS,CAAC,6CAA6C,CAAC;IAEtE,IAAA,IAAI,GAAI,gCAAwB,CAAC,SAAS,CAAC;QAChD,wBAAwB,EAAE,kDAA0C;KACrE,CAAC,GAFS,CAER;IACH,IAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,QAAQ;YACzB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,KAAK;YACtB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,IAAI,CAAC,aAAa,CAAC,SAAS;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEF,IAAI,QAAQ,CAAC,uBAAuB,IAAI,IAAI,EAAE;QAC5C,KAAkB,UAAgC,EAAhC,KAAA,QAAQ,CAAC,uBAAuB,EAAhC,cAAgC,EAAhC,IAAgC,EAAE;YAA/C,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAChB;KACF;IAED,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC;QACzC,SAAS,WAAA;QACT,IAAI,MAAA;QACJ,IAAI,MAAA;KACL,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACZ,CAAC;AArCD,kFAqCC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.d.ts b/clients/bolt-sdk/lib/index.d.ts deleted file mode 100644 index 4631ac4..0000000 --- a/clients/bolt-sdk/lib/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -import { PublicKey } from "@solana/web3.js"; -import BN from "bn.js"; -export * from "./generated/accounts"; -export * from "./generated/instructions"; -export * from "./world/transactions"; -export * from "./delegation/accounts"; -export * from "./delegation/delegate"; -export declare const SYSVAR_INSTRUCTIONS_PUBKEY: PublicKey; -export declare function FindWorldRegistryPda(programId?: PublicKey): PublicKey; -export declare function FindWorldPda(id: BN | string | number | Uint8Array, programId?: PublicKey): PublicKey; -export declare function FindEntityPda(worldId: BN | string | number | Uint8Array, entityId: BN | string | number | Uint8Array, extraSeed?: string, programId?: PublicKey): PublicKey; -export declare function FindComponentPda(componentProgramId: PublicKey, entity: PublicKey, componentId?: string): PublicKey; -export declare function SerializeArgs(args?: any): Buffer; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.d.ts.map b/clients/bolt-sdk/lib/index.d.ts.map deleted file mode 100644 index 7f0f920..0000000 --- a/clients/bolt-sdk/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,0BAA0B,WAEtC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,SAAqC,aAMjD;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EACrC,SAAS,GAAE,SAAqC,aAQjD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC1C,QAAQ,EAAE,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,EAC3C,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,GAAE,SAAqC,aAcjD;AAED,wBAAgB,gBAAgB,CAC9B,kBAAkB,EAAE,SAAS,EAC7B,MAAM,EAAE,SAAS,EACjB,WAAW,GAAE,MAAW,aAMzB;AAcD,wBAAgB,aAAa,CAAC,IAAI,GAAE,GAAQ,UAS3C"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.js b/clients/bolt-sdk/lib/index.js deleted file mode 100644 index 20c33b7..0000000 --- a/clients/bolt-sdk/lib/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SerializeArgs = exports.FindComponentPda = exports.FindEntityPda = exports.FindWorldPda = exports.FindWorldRegistryPda = exports.SYSVAR_INSTRUCTIONS_PUBKEY = void 0; -var web3_js_1 = require("@solana/web3.js"); -var bn_js_1 = __importDefault(require("bn.js")); -var generated_1 = require("generated"); -__exportStar(require("./generated/accounts"), exports); -__exportStar(require("./generated/instructions"), exports); -__exportStar(require("./world/transactions"), exports); -__exportStar(require("./delegation/accounts"), exports); -__exportStar(require("./delegation/delegate"), exports); -exports.SYSVAR_INSTRUCTIONS_PUBKEY = new web3_js_1.PublicKey("Sysvar1nstructions1111111111111111111111111"); -function FindWorldRegistryPda(programId) { - if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } - return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("registry")], programId)[0]; -} -exports.FindWorldRegistryPda = FindWorldRegistryPda; -function FindWorldPda(id, programId) { - if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } - id = CastToBN(id); - var idBuffer = Buffer.from(id.toArrayLike(Buffer, "be", 8)); - return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("world"), idBuffer], programId)[0]; -} -exports.FindWorldPda = FindWorldPda; -function FindEntityPda(worldId, entityId, extraSeed, programId) { - if (programId === void 0) { programId = new web3_js_1.PublicKey(generated_1.PROGRAM_ID); } - worldId = CastToBN(worldId); - entityId = CastToBN(entityId); - var worldIdBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8)); - var entityIdBuffer = Buffer.from(entityId.toArrayLike(Buffer, "be", 8)); - var seeds = [Buffer.from("entity"), worldIdBuffer]; - if (extraSeed != null) { - seeds.push(Buffer.from(new Uint8Array(8))); - seeds.push(Buffer.from(extraSeed)); - } - else { - seeds.push(entityIdBuffer); - } - return web3_js_1.PublicKey.findProgramAddressSync(seeds, programId)[0]; -} -exports.FindEntityPda = FindEntityPda; -function FindComponentPda(componentProgramId, entity, componentId) { - if (componentId === void 0) { componentId = ""; } - return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from(componentId), entity.toBytes()], componentProgramId)[0]; -} -exports.FindComponentPda = FindComponentPda; -function CastToBN(id) { - if (!(id instanceof bn_js_1.default)) { - id = new bn_js_1.default(id); - } - return id; -} -function SerializeArgs(args) { - if (args === void 0) { args = {}; } - var jsonString = JSON.stringify(args); - var encoder = new TextEncoder(); - var binaryData = encoder.encode(jsonString); - return Buffer.from(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); -} -exports.SerializeArgs = SerializeArgs; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/index.js.map b/clients/bolt-sdk/lib/index.js.map deleted file mode 100644 index 21aa3e5..0000000 --- a/clients/bolt-sdk/lib/index.js.map +++ /dev/null @@ -1 +0,0 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AAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxC,IAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,IAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,IAAI,CAChB,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,UAAU,EACrB,UAAU,CAAC,UAAU,CACtB,CAAC;AACJ,CAAC;AATD,sCASC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.d.ts b/clients/bolt-sdk/lib/world/transactions.d.ts deleted file mode 100644 index 3e7484b..0000000 --- a/clients/bolt-sdk/lib/world/transactions.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import BN from "bn.js"; -import type web3 from "@solana/web3.js"; -import { type Connection, type PublicKey, Transaction } from "@solana/web3.js"; -export declare function InitializeNewWorld({ payer, connection, }: { - payer: PublicKey; - connection: Connection; -}): Promise<{ - transaction: Transaction; - worldPda: PublicKey; - worldId: BN; -}>; -export declare function AddEntity({ payer, world, seed, connection, }: { - payer: PublicKey; - world: PublicKey; - seed?: string; - connection: Connection; -}): Promise<{ - transaction: Transaction; - entityPda: PublicKey; - entityId: BN; -}>; -export declare function InitializeComponent({ payer, entity, componentId, seed, authority, anchorRemainingAccounts, }: { - payer: PublicKey; - entity: PublicKey; - componentId: PublicKey; - seed?: string; - authority?: web3.PublicKey; - anchorRemainingAccounts?: web3.AccountMeta[]; -}): Promise<{ - transaction: Transaction; - componentPda: PublicKey; -}>; -interface ApplySystemEntity { - entity: PublicKey; - components: ApplySystemComponent[]; -} -interface ApplySystemComponent { - id: PublicKey; - seed?: string; -} -export declare function ApplySystem({ authority, systemId, entities, extraAccounts, args, }: { - authority: PublicKey; - systemId: PublicKey; - entities: ApplySystemEntity[]; - extraAccounts?: web3.AccountMeta[]; - args?: object; -}): Promise<{ - transaction: Transaction; -}>; -export {}; -//# sourceMappingURL=transactions.d.ts.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.d.ts.map b/clients/bolt-sdk/lib/world/transactions.d.ts.map deleted file mode 100644 index ec2edce..0000000 --- a/clients/bolt-sdk/lib/world/transactions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/world/transactions.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAW/E,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,CAAC,CAe1E;AASD,wBAAsB,SAAS,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,IAAI,EACJ,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,EAAE,CAAA;CAAE,CAAC,CAkB5E;AAYD,wBAAsB,mBAAmB,CAAC,EACxC,KAAK,EACL,MAAM,EACN,WAAW,EACX,IAAS,EACT,SAAS,EACT,uBAAuB,GACxB,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,uBAAuB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;CAC9C,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC,CAgBjE;AA6ED,UAAU,iBAAiB;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AACD,UAAU,oBAAoB;IAC5B,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAWD,wBAAsB,WAAW,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,IAAS,GACV,EAAE;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC,CAWxC"} \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.js b/clients/bolt-sdk/lib/world/transactions.js deleted file mode 100644 index fbd12bd..0000000 --- a/clients/bolt-sdk/lib/world/transactions.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ApplySystem = exports.InitializeComponent = exports.AddEntity = exports.InitializeNewWorld = void 0; -var index_1 = require("../index"); -var bn_js_1 = __importDefault(require("bn.js")); -var web3_js_1 = require("@solana/web3.js"); -var generated_1 = require("generated"); -var MAX_COMPONENTS = 5; -function InitializeNewWorld(_a) { - var payer = _a.payer, connection = _a.connection; - return __awaiter(this, void 0, void 0, function () { - var registryPda, registry, worldId, worldPda, initializeWorldIx; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - registryPda = (0, index_1.FindWorldRegistryPda)(); - return [4, index_1.Registry.fromAccountAddress(connection, registryPda)]; - case 1: - registry = _b.sent(); - worldId = new bn_js_1.default(registry.worlds); - worldPda = (0, index_1.FindWorldPda)(new bn_js_1.default(worldId)); - initializeWorldIx = (0, index_1.createInitializeNewWorldInstruction)({ - world: worldPda, - registry: registryPda, - payer: payer, - }); - return [2, { - transaction: new web3_js_1.Transaction().add(initializeWorldIx), - worldPda: worldPda, - worldId: worldId, - }]; - } - }); - }); -} -exports.InitializeNewWorld = InitializeNewWorld; -function AddEntity(_a) { - var payer = _a.payer, world = _a.world, seed = _a.seed, connection = _a.connection; - return __awaiter(this, void 0, void 0, function () { - var worldInstance, entityId, entityPda, createEntityIx; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4, index_1.World.fromAccountAddress(connection, world)]; - case 1: - worldInstance = _b.sent(); - entityId = new bn_js_1.default(worldInstance.entities); - entityPda = (0, index_1.FindEntityPda)(new bn_js_1.default(worldInstance.id), entityId); - createEntityIx = (0, index_1.createAddEntityInstruction)({ - world: world, - payer: payer, - entity: entityPda, - }, { extraSeed: seed !== null && seed !== void 0 ? seed : null }); - return [2, { - transaction: new web3_js_1.Transaction().add(createEntityIx), - entityPda: entityPda, - entityId: entityId, - }]; - } - }); - }); -} -exports.AddEntity = AddEntity; -function InitializeComponent(_a) { - var payer = _a.payer, entity = _a.entity, componentId = _a.componentId, _b = _a.seed, seed = _b === void 0 ? "" : _b, authority = _a.authority, anchorRemainingAccounts = _a.anchorRemainingAccounts; - return __awaiter(this, void 0, void 0, function () { - var componentPda, initComponentIx; - return __generator(this, function (_c) { - componentPda = (0, index_1.FindComponentPda)(componentId, entity, seed); - initComponentIx = (0, index_1.createInitializeComponentInstruction)({ - payer: payer, - entity: entity, - data: componentPda, - componentProgram: componentId, - authority: authority !== null && authority !== void 0 ? authority : generated_1.PROGRAM_ID, - instructionSysvarAccount: index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - anchorRemainingAccounts: anchorRemainingAccounts, - }); - return [2, { - transaction: new web3_js_1.Transaction().add(initComponentIx), - componentPda: componentPda, - }]; - }); - }); -} -exports.InitializeComponent = InitializeComponent; -function getApplyInstructionFunctionName(componentsCount) { - if (componentsCount === 1) - return "createApplyInstruction"; - return "createApply".concat(componentsCount, "Instruction"); -} -function getBoltComponentName(index, componentsCount) { - if (componentsCount === 1) - return "boltComponent"; - return "boltComponent".concat(index + 1); -} -function getBoltComponentProgramName(index, componentsCount) { - if (componentsCount === 1) - return "componentProgram"; - return "componentProgram".concat(index + 1); -} -function createApplySystemInstruction(_a) { - var authority = _a.authority, systemId = _a.systemId, entities = _a.entities, extraAccounts = _a.extraAccounts, args = _a.args; - var componentCount = 0; - entities.forEach(function (entity) { - componentCount += entity.components.length; - }); - if (componentCount <= 0) { - throw new Error("No components provided"); - } - if (componentCount > MAX_COMPONENTS) { - throw new Error("Not implemented for component counts outside 1-".concat(MAX_COMPONENTS)); - } - var instructionArgs = { - authority: authority, - boltSystem: systemId, - instructionSysvarAccount: index_1.SYSVAR_INSTRUCTIONS_PUBKEY, - anchorRemainingAccounts: extraAccounts, - }; - entities.forEach(function (entity) { - entity.components.forEach(function (component) { - var _a; - var componentPda = (0, index_1.FindComponentPda)(component.id, entity.entity, (_a = component.seed) !== null && _a !== void 0 ? _a : ""); - instructionArgs[getBoltComponentProgramName(componentCount, componentCount)] = component.id; - instructionArgs[getBoltComponentName(componentCount, componentCount)] = - componentPda; - }); - }); - var instructionFunctions = { - createApplyInstruction: index_1.createApplyInstruction, - createApply2Instruction: index_1.createApply2Instruction, - createApply3Instruction: index_1.createApply3Instruction, - createApply4Instruction: index_1.createApply4Instruction, - createApply5Instruction: index_1.createApply5Instruction, - }; - var functionName = getApplyInstructionFunctionName(componentCount); - return instructionFunctions[functionName](instructionArgs, { - args: (0, index_1.SerializeArgs)(args), - }); -} -function ApplySystem(_a) { - var authority = _a.authority, systemId = _a.systemId, entities = _a.entities, extraAccounts = _a.extraAccounts, _b = _a.args, args = _b === void 0 ? {} : _b; - return __awaiter(this, void 0, void 0, function () { - var applySystemIx; - return __generator(this, function (_c) { - applySystemIx = createApplySystemInstruction({ - authority: authority, - systemId: systemId, - entities: entities, - extraAccounts: extraAccounts, - args: args, - }); - return [2, { - transaction: new web3_js_1.Transaction().add(applySystemIx), - }]; - }); - }); -} -exports.ApplySystem = ApplySystem; -//# sourceMappingURL=transactions.js.map \ No newline at end of file diff --git a/clients/bolt-sdk/lib/world/transactions.js.map b/clients/bolt-sdk/lib/world/transactions.js.map deleted file mode 100644 index 1554bd9..0000000 --- a/clients/bolt-sdk/lib/world/transactions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/world/transactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAiBkB;AAClB,gDAAuB;AAEvB,2CAA+E;AAC/E,uCAAuC;AAEvC,IAAM,cAAc,GAAG,CAAC,CAAC;AAQzB,SAAsB,kBAAkB,CAAC,EAMxC;QALC,KAAK,WAAA,EACL,UAAU,gBAAA;;;;;;oBAKJ,WAAW,GAAG,IAAA,4BAAoB,GAAE,CAAC;oBAC1B,WAAM,gBAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,WAAW,CAAC,EAAA;;oBAArE,QAAQ,GAAG,SAA0D;oBACrE,OAAO,GAAG,IAAI,eAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBAClC,QAAQ,GAAG,IAAA,oBAAY,EAAC,IAAI,eAAE,CAAC,OAAO,CAAC,CAAC,CAAC;oBACzC,iBAAiB,GAAG,IAAA,2CAAmC,EAAC;wBAC5D,KAAK,EAAE,QAAQ;wBACf,QAAQ,EAAE,WAAW;wBACrB,KAAK,OAAA;qBACN,CAAC,CAAC;o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C,CAAC;YACH,WAAO;oBACL,WAAW,EAAE,IAAI,qBAAW,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC;iBAClD,EAAC;;;CACH;AAvBD,kCAuBC"} \ No newline at end of file diff --git a/tests/bolt.ts b/tests/bolt.ts index 43254ad..04c1c3f 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -19,6 +19,7 @@ import { FindEntityPda, FindWorldPda, FindWorldRegistryPda, + InitializeComponent, InitializeNewWorld, SYSVAR_INSTRUCTIONS_PUBKEY, } from "../clients/bolt-sdk"; @@ -67,9 +68,9 @@ describe("bolt", () => { let entity1Pda: PublicKey; let entity2Pda: PublicKey; let entity5Pda: PublicKey; - let componentPositionEntity1: PublicKey; - let componentPositionEntity2: PublicKey; - let componentPositionEntity5: PublicKey; + let componentPositionEntity1Pda: PublicKey; + let componentPositionEntity2Pda: PublicKey; + let componentPositionEntity5Pda: PublicKey; let componentVelocityEntity1: PublicKey; it("InitializeWorldsRegistry", async () => { @@ -149,142 +150,70 @@ describe("bolt", () => { }); it("Initialize Original Component on Entity 1, trough the world instance", async () => { - const componentEntity1 = FindComponentPda( - boltComponentProgramOrigin.programId, - entity1, - "origin-component" - ); - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentEntity1, - componentProgram: boltComponentProgramOrigin.programId, - entity: entity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity1Pda, + seed: "origin-component", + componentId: boltComponentProgramOrigin.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); }); it("Initialize Original Component on Entity 2, trough the world instance", async () => { - const componentEntity2 = FindComponentPda( - boltComponentProgramOrigin.programId, - entity2, - "origin-component" - ); - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentEntity2, - componentProgram: boltComponentProgramOrigin.programId, - entity: entity2, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity2Pda, + seed: "origin-component", + componentId: boltComponentProgramOrigin.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); }); it("Initialize Position Component on Entity 1", async () => { - componentPositionEntity1 = FindComponentPda( - boltComponentPositionProgram.programId, - entity1 - ); - - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentPositionEntity1, - componentProgram: boltComponentPositionProgram.programId, - entity: entity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: worldProgram.programId, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity1Pda, + componentId: boltComponentPositionProgram.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); + componentPositionEntity1Pda = inititializeComponent.componentPda; // Saved for later }); it("Initialize Velocity Component on Entity 1", async () => { - componentVelocityEntity1 = FindComponentPda( - boltComponentVelocityProgram.programId, - entity1, - "component-velocity" - ); - - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentVelocityEntity1, - componentProgram: boltComponentVelocityProgram.programId, - entity: entity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: worldProgram.programId, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity1Pda, + componentId: boltComponentVelocityProgram.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); }); it("Initialize Position Component on Entity 2", async () => { - componentPositionEntity2 = FindComponentPda( - boltComponentPositionProgram.programId, - entity2 - ); - - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentPositionEntity2, - componentProgram: boltComponentPositionProgram.programId, - entity: entity2, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: worldProgram.programId, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity2Pda, + componentId: boltComponentPositionProgram.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); + componentPositionEntity2Pda = inititializeComponent.componentPda; // Saved for later }); it("Initialize Position Component on Entity 5", async () => { - componentPositionEntity5 = FindComponentPda( - boltComponentPositionProgram.programId, - entity5 - ); - - await worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentPositionEntity5, - componentProgram: boltComponentPositionProgram.programId, - entity: entity5, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); + const inititializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity5Pda, + componentId: boltComponentPositionProgram.programId, + }); + await provider.sendAndConfirm(inititializeComponent.transaction); }); it("Check Position on Entity 1 is default", async () => { - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).x.toNumber() - ).to.equal(0); - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).y.toNumber() - ).to.equal(0); - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).z.toNumber() - ).to.equal(0); + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + expect(position.x.toNumber()).to.equal(0); + expect(position.y.toNumber()).to.equal(0); + expect(position.z.toNumber()).to.equal(0); }); it("Simple Movement System and Up direction on Entity 1", async () => { From 9a6623166149be1c2ccbf3ce8fc8ea637cf8ceea Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 09:12:30 +0100 Subject: [PATCH 13/31] Upload progressg --- clients/bolt-sdk/.gitignore | 1 + tests/bolt.ts | 386 ++++++++++++++++++------------------ 2 files changed, 199 insertions(+), 188 deletions(-) create mode 100644 clients/bolt-sdk/.gitignore diff --git a/clients/bolt-sdk/.gitignore b/clients/bolt-sdk/.gitignore new file mode 100644 index 0000000..a65b417 --- /dev/null +++ b/clients/bolt-sdk/.gitignore @@ -0,0 +1 @@ +lib diff --git a/tests/bolt.ts b/tests/bolt.ts index 04c1c3f..9b224e9 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -24,6 +24,7 @@ import { SYSVAR_INSTRUCTIONS_PUBKEY, } from "../clients/bolt-sdk"; import { createUndelegateInstruction } from "../clients/bolt-sdk/lib/delegation/undelegate"; +import { ApplySystem } from "../clients/bolt-sdk/src"; enum Direction { Left = "Left", @@ -60,7 +61,7 @@ describe("bolt", () => { ).programId; const systemFly = (anchor.workspace.SystemFly as Program) .programId; - const applyVelocity = ( + const systemApplyVelocity = ( anchor.workspace.SystemApplyVelocity as Program ).programId; @@ -71,7 +72,7 @@ describe("bolt", () => { let componentPositionEntity1Pda: PublicKey; let componentPositionEntity2Pda: PublicKey; let componentPositionEntity5Pda: PublicKey; - let componentVelocityEntity1: PublicKey; + let componentVelocityEntity1Pda: PublicKey; it("InitializeWorldsRegistry", async () => { const registryPda = FindWorldRegistryPda(worldProgram.programId); @@ -217,35 +218,31 @@ describe("bolt", () => { }); it("Simple Movement System and Up direction on Entity 1", async () => { - const args = { - direction: Direction.Up, - }; - await worldProgram.methods - .apply(serializeArgs(args)) // Move Up - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemSimpleMovement, - boltComponent: componentPositionEntity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); - - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).y.toNumber() - ).to.equal(1); - - const componentData = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemSimpleMovement, + entities: [ + { + entity: entity1Pda, + components: [{ id: boltComponentPositionProgram.programId }], + }, + ], + args: { + direction: Direction.Up, + }, + }); + await provider.sendAndConfirm(applySystem.transaction); + + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + const x = position.x.toNumber(); + const y = position.y.toNumber(); + const z = position.z.toNumber(); + expect(x).to.equal(0); + expect(y).to.equal(1); + expect(z).to.equal(0); + console.log("+-----------------------------+"); console.log("| Movement System: Entity 1 |"); console.log("+----------------+------------+"); @@ -259,46 +256,35 @@ describe("bolt", () => { console.log("+----------------+------------+"); console.log("| |"); console.log("+-----------------------------+"); - console.log("Component Position: ", componentPositionEntity1.toString()); + console.log("Component Position: ", componentPositionEntity1Pda.toString()); }); it("Simple Movement System and Right direction on Entity 1", async () => { - const args = { - direction: Direction.Right, - }; - await worldProgram.methods - .apply(serializeArgs(args)) // Move Right - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemSimpleMovement, - boltComponent: componentPositionEntity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); - - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).y.toNumber() - ).to.equal(1); - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).y.toNumber() - ).to.equal(1); - - const componentData = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemSimpleMovement, + entities: [ + { + entity: entity1Pda, + components: [{ id: boltComponentPositionProgram.programId }], + }, + ], + args: { + direction: Direction.Right, + }, + }); + await provider.sendAndConfirm(applySystem.transaction); + + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + const x = position.x.toNumber(); + const y = position.y.toNumber(); + const z = position.z.toNumber(); + expect(x).to.equal(1); + expect(y).to.equal(1); + expect(z).to.equal(0); + console.log("+-----------------------------+"); console.log("| Movement System: Entity 1 |"); console.log("+----------------+------------+"); @@ -315,32 +301,28 @@ describe("bolt", () => { }); it("Fly System on Entity 1", async () => { - await worldProgram.methods - .apply(Buffer.alloc(0)) // Move Up - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemFly, - boltComponent: componentPositionEntity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); - - expect( - ( - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ) - ).z.toNumber() - ).to.equal(1); - - const componentData = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemFly, + entities: [ + { + entity: entity1Pda, + components: [{ id: boltComponentPositionProgram.programId }], + }, + ], + }); + await provider.sendAndConfirm(applySystem.transaction); + + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + const x = position.x.toNumber(); + const y = position.y.toNumber(); + const z = position.z.toNumber(); + expect(x).to.equal(1); + expect(y).to.equal(1); + expect(z).to.equal(1); + console.log("+-----------------------------+"); console.log("| Fly: Position Entity 1 |"); console.log("+----------------+------------+"); @@ -356,53 +338,62 @@ describe("bolt", () => { console.log("+-----------------------------+"); }); - it("Apply Velocity on Entity 1", async () => { - await worldProgram.methods - .apply2(Buffer.alloc(0)) - .accounts({ - componentProgram1: boltComponentVelocityProgram.programId, - componentProgram2: boltComponentPositionProgram.programId, - boltSystem: applyVelocity, - boltComponent1: componentVelocityEntity1, - boltComponent2: componentPositionEntity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); - - const componentData = - await boltComponentVelocityProgram.account.velocity.fetch( - componentVelocityEntity1 - ); - let x = componentData.x.toNumber(); - let y = componentData.y.toNumber(); - let z = componentData.z.toNumber(); - const tmp = componentData.lastApplied.toNumber(); + it("Apply System Velocity on Entity 1", async () => { + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemApplyVelocity, + entities: [ + { + entity: entity1Pda, + components: [ + { id: boltComponentVelocityProgram.programId }, + { id: boltComponentPositionProgram.programId }, + ], + }, + ], + }); + await provider.sendAndConfirm(applySystem.transaction); + + const velocity = await boltComponentVelocityProgram.account.velocity.fetch( + componentVelocityEntity1Pda + ); + const vx = velocity.x.toNumber(); + const vy = velocity.y.toNumber(); + const vz = velocity.z.toNumber(); + const ts = velocity.lastApplied.toNumber(); + expect(vx).to.equal(0); + expect(vy).to.equal(0); + expect(vz).to.equal(0); + expect(ts).to.equal(0); + console.log("+-----------------------------+"); - console.log("| Apply Velocity: Velocity Entity 1 |"); + console.log("| Apply System Velocity: Velocity Entity 1 |"); console.log("+----------------+------------+"); console.log("| Coordinate | Value |"); console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); + console.log(`| X Position | ${String(vx).padEnd(10, " ")} |`); console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); + console.log(`| Y Position | ${String(vy).padEnd(10, " ")} |`); console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); + console.log(`| Z Position | ${String(vz).padEnd(10, " ")} |`); console.log("| | |"); - console.log(`| Timestamp | ${String(tmp).padEnd(10, " ")} |`); + console.log(`| Timestamp | ${String(ts).padEnd(10, " ")} |`); console.log("+----------------+------------+"); console.log("| |"); console.log("+-----------------------------+"); - const positionData = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - x = positionData.x.toNumber(); - y = positionData.y.toNumber(); - z = positionData.z.toNumber(); + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + const x = position.x.toNumber(); + const y = position.y.toNumber(); + const z = position.z.toNumber(); + expect(x).to.equal(1); + expect(y).to.equal(1); + expect(z).to.equal(1); + console.log("+-----------------------------+"); - console.log("| Apply Velocity: Position Entity 1 |"); + console.log("| Apply System Velocity: Position Entity 1 |"); console.log("+----------------+------------+"); console.log("| Coordinate | Value |"); console.log("+----------------+------------+"); @@ -414,22 +405,22 @@ describe("bolt", () => { console.log("+----------------+------------+"); console.log("| |"); console.log("+-----------------------------+"); - expect(positionData.z.toNumber()).to.not.equal(300); }); - it("Apply Velocity on Entity 1, with Clock external account", async () => { - await worldProgram.methods - .apply2(Buffer.alloc(0)) - .accounts({ - componentProgram1: boltComponentVelocityProgram.programId, - componentProgram2: boltComponentPositionProgram.programId, - boltSystem: applyVelocity, - boltComponent1: componentVelocityEntity1, - boltComponent2: componentPositionEntity1, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .remainingAccounts([ + it("Apply System Velocity on Entity 1, with Clock external account", async () => { + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemApplyVelocity, + entities: [ + { + entity: entity1Pda, + components: [ + { id: boltComponentVelocityProgram.programId }, + { id: boltComponentPositionProgram.programId }, + ], + }, + ], + extraAccounts: [ { pubkey: new web3.PublicKey( "SysvarC1ock11111111111111111111111111111111" @@ -437,71 +428,89 @@ describe("bolt", () => { isWritable: false, isSigner: false, }, - ]) - .rpc(); + ], + }); + await provider.sendAndConfirm(applySystem.transaction); - const positionData = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - // Check if the position has changed to 300 (which means the account clock was used) - expect(positionData.z.toNumber()).to.equal(300); + const position = await boltComponentPositionProgram.account.position.fetch( + componentPositionEntity1Pda + ); + const x = position.x.toNumber(); + const y = position.y.toNumber(); + const z = position.z.toNumber(); + expect(x).to.equal(1); + expect(y).to.equal(1); + expect(z).to.equal(300); + + console.log("+-----------------------------+"); + console.log("| Apply System Velocity: Position Entity 1 |"); + console.log("+----------------+------------+"); + console.log("| Coordinate | Value |"); + console.log("+----------------+------------+"); + console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); + console.log("| | |"); + console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); + console.log("| | |"); + console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); + console.log("+----------------+------------+"); + console.log("| |"); + console.log("+-----------------------------+"); }); // Check illegal authority usage it("Check invalid component update", async () => { - const componentDataPrev = + const positionBefore = await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity5 + componentPositionEntity5Pda ); + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: systemFly, + entities: [ + { + entity: entity5Pda, + components: [{ id: boltComponentPositionProgram.programId }], + }, + ], + }); + + let failed = false; try { - await worldProgram.methods - .apply(Buffer.alloc(0)) // Move Up - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemFly, - boltComponent: componentPositionEntity5, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - authority: provider.wallet.publicKey, - }) - .rpc(); - } catch (e) { - expect(e.message).to.contain("Invalid authority"); + await provider.sendAndConfirm(applySystem.transaction); + } catch (error) { + failed = true; + expect(error.message).to.contain("Invalid authority"); } + expect(failed).to.equal(true); - const componentData = + const positionAfter = await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity5 + componentPositionEntity5Pda ); - expect( - componentDataPrev.x.toNumber() === componentData.x.toNumber() && - componentDataPrev.y.toNumber() === componentData.y.toNumber() && - componentDataPrev.z.toNumber() === componentData.z.toNumber() - ).to.equal(true); + expect(positionBefore.x.toNumber()).to.equal(positionAfter.x.toNumber()); + expect(positionBefore.y.toNumber()).to.equal(positionAfter.y.toNumber()); + expect(positionBefore.z.toNumber()).to.equal(positionAfter.z.toNumber()); }); // Check illegal call, without CPI it("Check invalid init without CPI", async () => { let invalid = false; - const componentVelocityEntity5 = FindComponentPda( - boltComponentVelocityProgram.programId, - entity5 - ); try { - await boltComponentProgramOrigin.methods + await boltComponentPositionProgram.methods .initialize() .accounts({ payer: provider.wallet.publicKey, - data: componentVelocityEntity5, - entity: entity5, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - systemProgram: anchor.web3.SystemProgram.programId, + data: componentPositionEntity5Pda, + entity: entity5Pda, + //instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, + //systemProgram: anchor.web3.SystemProgram.programId, authority: provider.wallet.publicKey, }) .rpc(); } catch (e) { + console.log("ERROR:", e); invalid = true; } expect(invalid).to.equal(true); @@ -512,18 +521,19 @@ describe("bolt", () => { let invalid = false; const componentVelocityEntity5 = FindComponentPda( boltComponentVelocityProgram.programId, - entity5 + entity5Pda ); try { await boltComponentProgramOrigin.methods .update(null) .accounts({ boltComponent: componentVelocityEntity5, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, + //instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, authority: provider.wallet.publicKey, }) .rpc(); } catch (e) { + console.log("ERROR2:", e); invalid = true; } expect(invalid).to.equal(true); @@ -532,15 +542,15 @@ describe("bolt", () => { // Check component delegation it("Check component delegation", async () => { const delegateIx = createDelegateInstruction({ - entity: entity1, - account: componentPositionEntity1, + entity: entity1Pda, + account: componentPositionEntity1Pda, ownerProgram: boltComponentPositionProgram.programId, payer: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); await provider.sendAndConfirm(tx, [], { skipPreflight: true }); const acc = await provider.connection.getAccountInfo( - componentPositionEntity1 + componentPositionEntity1Pda ); expect(acc.owner.toString()).to.equal(DELEGATION_PROGRAM_ID); }); @@ -549,14 +559,14 @@ describe("bolt", () => { it("Check component undelegation", async () => { const delegateIx = createUndelegateInstruction({ payer: provider.wallet.publicKey, - delegatedAccount: componentPositionEntity1, + delegatedAccount: componentPositionEntity1Pda, ownerProgram: boltComponentPositionProgram.programId, reimbursement: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); await provider.sendAndConfirm(tx, [], { skipPreflight: true }); const acc = await provider.connection.getAccountInfo( - componentPositionEntity1 + componentPositionEntity1Pda ); expect(acc.owner).to.deep.equal(boltComponentPositionProgram.programId); }); From 45f55a8a0e9000b432045ea6953d348a62b8a9e6 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 10:37:42 +0100 Subject: [PATCH 14/31] saving-progress-before-splitting-pr --- clients/bolt-sdk/src/index.ts | 2 +- clients/bolt-sdk/src/world/transactions.ts | 18 +- package.json | 2 +- tests/bolt.ts | 287 ++++++++------------- 4 files changed, 118 insertions(+), 191 deletions(-) diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 4017fc3..08dc890 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -1,6 +1,6 @@ import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; -import { PROGRAM_ID } from "generated"; +import { PROGRAM_ID } from "./generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; export * from "./world/transactions"; diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index bfe2007..313f05a 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -19,7 +19,7 @@ import { import BN from "bn.js"; import type web3 from "@solana/web3.js"; import { type Connection, type PublicKey, Transaction } from "@solana/web3.js"; -import { PROGRAM_ID } from "generated"; +import { PROGRAM_ID } from "../generated"; const MAX_COMPONENTS = 5; @@ -35,11 +35,10 @@ export async function InitializeNewWorld({ }: { payer: PublicKey; connection: Connection; -}): Promise<{ transaction: Transaction; worldPda: PublicKey; worldId: BN }> { +}): Promise<{ transaction: Transaction; worldPda: PublicKey }> { const registryPda = FindWorldRegistryPda(); const registry = await Registry.fromAccountAddress(connection, registryPda); - const worldId = new BN(registry.worlds); - const worldPda = FindWorldPda(new BN(worldId)); + const worldPda = FindWorldPda(new BN(registry.worlds)); const initializeWorldIx = createInitializeNewWorldInstruction({ world: worldPda, registry: registryPda, @@ -48,7 +47,6 @@ export async function InitializeNewWorld({ return { transaction: new Transaction().add(initializeWorldIx), worldPda, - worldId, }; } @@ -69,11 +67,12 @@ export async function AddEntity({ world: PublicKey; seed?: string; connection: Connection; -}): Promise<{ transaction: Transaction; entityPda: PublicKey; entityId: BN }> { +}): Promise<{ transaction: Transaction; entityPda: PublicKey }> { const worldInstance = await World.fromAccountAddress(connection, world); - const entityId = new BN(worldInstance.entities); - const entityPda = FindEntityPda(new BN(worldInstance.id), entityId); - + const entityPda = FindEntityPda( + new BN(worldInstance.id), + new BN(worldInstance.entities) + ); const createEntityIx = createAddEntityInstruction( { world, @@ -85,7 +84,6 @@ export async function AddEntity({ return { transaction: new Transaction().add(createEntityIx), entityPda, - entityId, }; } diff --git a/package.json b/package.json index 3db2601..bf6df6f 100644 --- a/package.json +++ b/package.json @@ -30,4 +30,4 @@ }, "license": "MIT", "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" -} +} \ No newline at end of file diff --git a/tests/bolt.ts b/tests/bolt.ts index 9b224e9..d42701f 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -4,7 +4,7 @@ import { type PublicKey } from "@solana/web3.js"; import { type Position } from "../target/types/position"; import { type Velocity } from "../target/types/velocity"; import { type BoltComponent } from "../target/types/bolt_component"; -import { type SystemSimpleMovement } from "../target/types/system_simple_movement"; +import { SystemSimpleMovement } from "../target/types/system_simple_movement"; import { type SystemFly } from "../target/types/system_fly"; import { type SystemApplyVelocity } from "../target/types/system_apply_velocity"; import { type World } from "../target/types/world"; @@ -16,8 +16,6 @@ import { createInitializeRegistryInstruction, DELEGATION_PROGRAM_ID, FindComponentPda, - FindEntityPda, - FindWorldPda, FindWorldRegistryPda, InitializeComponent, InitializeNewWorld, @@ -44,24 +42,56 @@ function serializeArgs(args: any = {}) { ); } +function padCenter(value: string, width: number) { + const length = value.length; + const padding = (width - length) / 2; + const align = length - padding; + return value.padEnd(align, " ").padStart(width, " "); +} + +function logPosition(title: string, { x, y, z }: { x: BN; y: BN; z: BN }) { + console.log("+----------------------------+"); + console.log(`| ${padCenter(title, 20)} |`); + console.log("+---------------+------------+"); + console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); + console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); + console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); + console.log("+---------------+------------+"); +} + +function logVelocity( + title: string, + { x, y, z, lastApplied }: { x: BN; y: BN; z: BN; lastApplied: BN } +) { + console.log("+----------------------------+"); + console.log(`| ${padCenter(title, 20)} |`); + console.log("+---------------+------------+"); + console.log(`| X Velocity | ${String(x).padEnd(10, " ")} |`); + console.log(`| Y Velocity | ${String(y).padEnd(10, " ")} |`); + console.log(`| Z Velocity | ${String(z).padEnd(10, " ")} |`); + console.log(`| Last Applied | ${String(lastApplied).padEnd(10, " ")} |`); + console.log("+---------------+------------+"); +} + describe("bolt", () => { const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); - const worldProgram = anchor.workspace.World as Program; - const boltComponentPositionProgram = anchor.workspace + const boltWorld = anchor.workspace.World as Program; + const boltComponentProgram = anchor.workspace + .BoltComponent as Program; + + const exampleComponentPosition = anchor.workspace .Position as Program; - const boltComponentVelocityProgram = anchor.workspace + const exampleComponentVelocity = anchor.workspace .Velocity as Program; - const boltComponentProgramOrigin = anchor.workspace - .BoltComponent as Program; - const systemSimpleMovement = ( + const exampleSystemSimpleMovement = ( anchor.workspace.SystemSimpleMovement as Program ).programId; - const systemFly = (anchor.workspace.SystemFly as Program) + const exampleSystemFly = (anchor.workspace.SystemFly as Program) .programId; - const systemApplyVelocity = ( + const exampleSystemApplyVelocity = ( anchor.workspace.SystemApplyVelocity as Program ).programId; @@ -75,7 +105,7 @@ describe("bolt", () => { let componentVelocityEntity1Pda: PublicKey; it("InitializeWorldsRegistry", async () => { - const registryPda = FindWorldRegistryPda(worldProgram.programId); + const registryPda = FindWorldRegistryPda(boltWorld.programId); const initializeRegistryIx = createInitializeRegistryInstruction({ registry: registryPda, payer: provider.wallet.publicKey, @@ -134,7 +164,7 @@ describe("bolt", () => { const addEntity = await AddEntity({ payer: provider.wallet.publicKey, world: worldPda, - seed: "extra-seed", + seed: "extra-seed", // TODO(vbrunet) - extra seed doesn't work for some reason? connection: provider.connection, }); await provider.sendAndConfirm(addEntity.transaction); @@ -154,8 +184,8 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, - seed: "origin-component", - componentId: boltComponentProgramOrigin.programId, + //seed: "origin-component", + componentId: boltComponentProgram.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); }); @@ -164,8 +194,8 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity2Pda, - seed: "origin-component", - componentId: boltComponentProgramOrigin.programId, + //seed: "origin-component", + componentId: boltComponentProgram.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); }); @@ -174,7 +204,7 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, - componentId: boltComponentPositionProgram.programId, + componentId: exampleComponentPosition.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); componentPositionEntity1Pda = inititializeComponent.componentPda; // Saved for later @@ -184,7 +214,7 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, - componentId: boltComponentVelocityProgram.programId, + componentId: exampleComponentVelocity.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); }); @@ -193,7 +223,7 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity2Pda, - componentId: boltComponentPositionProgram.programId, + componentId: exampleComponentPosition.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); componentPositionEntity2Pda = inititializeComponent.componentPda; // Saved for later @@ -203,13 +233,13 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity5Pda, - componentId: boltComponentPositionProgram.programId, + componentId: exampleComponentPosition.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); }); it("Check Position on Entity 1 is default", async () => { - const position = await boltComponentPositionProgram.account.position.fetch( + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); expect(position.x.toNumber()).to.equal(0); @@ -220,11 +250,11 @@ describe("bolt", () => { it("Simple Movement System and Up direction on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemSimpleMovement, + systemId: exampleSystemSimpleMovement, entities: [ { entity: entity1Pda, - components: [{ id: boltComponentPositionProgram.programId }], + components: [{ id: exampleComponentPosition.programId }], }, ], args: { @@ -233,40 +263,23 @@ describe("bolt", () => { }); await provider.sendAndConfirm(applySystem.transaction); - const position = await boltComponentPositionProgram.account.position.fetch( + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - const x = position.x.toNumber(); - const y = position.y.toNumber(); - const z = position.z.toNumber(); - expect(x).to.equal(0); - expect(y).to.equal(1); - expect(z).to.equal(0); - - console.log("+-----------------------------+"); - console.log("| Movement System: Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - console.log("Component Position: ", componentPositionEntity1Pda.toString()); + logPosition("Movement System: Entity 1", position); + expect(position.x.toNumber()).to.equal(0); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(0); }); it("Simple Movement System and Right direction on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemSimpleMovement, + systemId: exampleSystemSimpleMovement, entities: [ { entity: entity1Pda, - components: [{ id: boltComponentPositionProgram.programId }], + components: [{ id: exampleComponentPosition.programId }], }, ], args: { @@ -275,148 +288,81 @@ describe("bolt", () => { }); await provider.sendAndConfirm(applySystem.transaction); - const position = await boltComponentPositionProgram.account.position.fetch( + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - const x = position.x.toNumber(); - const y = position.y.toNumber(); - const z = position.z.toNumber(); - expect(x).to.equal(1); - expect(y).to.equal(1); - expect(z).to.equal(0); - - console.log("+-----------------------------+"); - console.log("| Movement System: Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); + logPosition("Movement System: Entity 1", position); + expect(position.x.toNumber()).to.equal(1); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(0); }); it("Fly System on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemFly, + systemId: exampleSystemFly, entities: [ { entity: entity1Pda, - components: [{ id: boltComponentPositionProgram.programId }], + components: [{ id: exampleComponentPosition.programId }], }, ], }); await provider.sendAndConfirm(applySystem.transaction); - const position = await boltComponentPositionProgram.account.position.fetch( + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - const x = position.x.toNumber(); - const y = position.y.toNumber(); - const z = position.z.toNumber(); - expect(x).to.equal(1); - expect(y).to.equal(1); - expect(z).to.equal(1); - - console.log("+-----------------------------+"); - console.log("| Fly: Position Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); + logPosition("Fly System: Entity 1", position); + expect(position.x.toNumber()).to.equal(1); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(1); }); it("Apply System Velocity on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemApplyVelocity, + systemId: exampleSystemApplyVelocity, entities: [ { entity: entity1Pda, components: [ - { id: boltComponentVelocityProgram.programId }, - { id: boltComponentPositionProgram.programId }, + { id: exampleComponentVelocity.programId }, + { id: exampleComponentPosition.programId }, ], }, ], }); await provider.sendAndConfirm(applySystem.transaction); - const velocity = await boltComponentVelocityProgram.account.velocity.fetch( + const velocity = await exampleComponentVelocity.account.velocity.fetch( componentVelocityEntity1Pda ); - const vx = velocity.x.toNumber(); - const vy = velocity.y.toNumber(); - const vz = velocity.z.toNumber(); - const ts = velocity.lastApplied.toNumber(); - expect(vx).to.equal(0); - expect(vy).to.equal(0); - expect(vz).to.equal(0); - expect(ts).to.equal(0); - - console.log("+-----------------------------+"); - console.log("| Apply System Velocity: Velocity Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(vx).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(vy).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(vz).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Timestamp | ${String(ts).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - - const position = await boltComponentPositionProgram.account.position.fetch( + logVelocity("Apply System Velocity: Velocity Entity 1", velocity); + expect(velocity.x.toNumber()).to.equal(0); + expect(velocity.y.toNumber()).to.equal(0); + expect(velocity.z.toNumber()).to.equal(0); + expect(velocity.lastApplied.toNumber()).to.equal(0); + + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - const x = position.x.toNumber(); - const y = position.y.toNumber(); - const z = position.z.toNumber(); - expect(x).to.equal(1); - expect(y).to.equal(1); - expect(z).to.equal(1); - - console.log("+-----------------------------+"); - console.log("| Apply System Velocity: Position Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); + logPosition("Apply System Velocity: Position Entity 1", position); + expect(position.x.toNumber()).to.equal(1); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(1); }); it("Apply System Velocity on Entity 1, with Clock external account", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemApplyVelocity, + systemId: exampleSystemApplyVelocity, entities: [ { entity: entity1Pda, components: [ - { id: boltComponentVelocityProgram.programId }, - { id: boltComponentPositionProgram.programId }, + { id: exampleComponentVelocity.programId }, + { id: exampleComponentPosition.programId }, ], }, ], @@ -432,45 +378,29 @@ describe("bolt", () => { }); await provider.sendAndConfirm(applySystem.transaction); - const position = await boltComponentPositionProgram.account.position.fetch( + const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - const x = position.x.toNumber(); - const y = position.y.toNumber(); - const z = position.z.toNumber(); - expect(x).to.equal(1); - expect(y).to.equal(1); - expect(z).to.equal(300); - - console.log("+-----------------------------+"); - console.log("| Apply System Velocity: Position Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); + logPosition("Apply System Velocity: Position Entity 1", position); + expect(position.x.toNumber()).to.equal(1); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(300); }); // Check illegal authority usage it("Check invalid component update", async () => { const positionBefore = - await boltComponentPositionProgram.account.position.fetch( + await exampleComponentPosition.account.position.fetch( componentPositionEntity5Pda ); const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, - systemId: systemFly, + systemId: exampleSystemFly, entities: [ { entity: entity5Pda, - components: [{ id: boltComponentPositionProgram.programId }], + components: [{ id: exampleComponentPosition.programId }], }, ], }); @@ -484,10 +414,9 @@ describe("bolt", () => { } expect(failed).to.equal(true); - const positionAfter = - await boltComponentPositionProgram.account.position.fetch( - componentPositionEntity5Pda - ); + const positionAfter = await exampleComponentPosition.account.position.fetch( + componentPositionEntity5Pda + ); expect(positionBefore.x.toNumber()).to.equal(positionAfter.x.toNumber()); expect(positionBefore.y.toNumber()).to.equal(positionAfter.y.toNumber()); @@ -498,7 +427,7 @@ describe("bolt", () => { it("Check invalid init without CPI", async () => { let invalid = false; try { - await boltComponentPositionProgram.methods + await exampleComponentPosition.methods .initialize() .accounts({ payer: provider.wallet.publicKey, @@ -520,11 +449,11 @@ describe("bolt", () => { it("Check invalid update without CPI", async () => { let invalid = false; const componentVelocityEntity5 = FindComponentPda( - boltComponentVelocityProgram.programId, + exampleComponentVelocity.programId, entity5Pda ); try { - await boltComponentProgramOrigin.methods + await boltComponentProgram.methods .update(null) .accounts({ boltComponent: componentVelocityEntity5, @@ -544,7 +473,7 @@ describe("bolt", () => { const delegateIx = createDelegateInstruction({ entity: entity1Pda, account: componentPositionEntity1Pda, - ownerProgram: boltComponentPositionProgram.programId, + ownerProgram: exampleComponentPosition.programId, payer: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); @@ -560,7 +489,7 @@ describe("bolt", () => { const delegateIx = createUndelegateInstruction({ payer: provider.wallet.publicKey, delegatedAccount: componentPositionEntity1Pda, - ownerProgram: boltComponentPositionProgram.programId, + ownerProgram: exampleComponentPosition.programId, reimbursement: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); @@ -568,6 +497,6 @@ describe("bolt", () => { const acc = await provider.connection.getAccountInfo( componentPositionEntity1Pda ); - expect(acc.owner).to.deep.equal(boltComponentPositionProgram.programId); + expect(acc.owner).to.deep.equal(exampleComponentPosition.programId); }); }); From 13b9c6365b991cb9850d377d16328ea88eb1b896 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 16:19:45 +0100 Subject: [PATCH 15/31] yarn-build --- .github/workflows/run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2cf8ae3..5c46c01 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -154,18 +154,18 @@ jobs: cargo install --path cli --force --locked bolt build - - name: run tests - run: | - export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cargo install --path cli --force --locked - bolt test - - name: Generate lib run: | cd clients/bolt-sdk yarn build cd ../.. + - name: run tests + run: | + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + cargo install --path cli --force --locked + bolt test + - name: Install the Bolt CLI and create & build a new project shell: bash run: | From cbdcd22826173037f2976383136d338d15a7b4a5 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 17:47:38 +0100 Subject: [PATCH 16/31] update-before-merge --- Anchor.toml | 12 ++++++-- clients/bolt-sdk/src/world/transactions.ts | 2 +- tests/bolt.ts | 34 +++++++++++----------- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/Anchor.toml b/Anchor.toml index 5a3a7d9..177ebbc 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -8,7 +8,6 @@ skip-lint = false world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" [programs.localnet] -world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n" bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua" bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP" position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ" @@ -30,7 +29,16 @@ shutdown_wait = 2000 upgradeable = false [workspace] -members = ["programs/bolt-component", "programs/bolt-system", "programs/world", "examples/component-position", "examples/component-velocity", "examples/system-apply-velocity", "examples/system-fly", "examples/system-simple-movement"] +members = [ + "programs/bolt-component", + "programs/bolt-system", + "programs/world", + "examples/component-position", + "examples/component-velocity", + "examples/system-apply-velocity", + "examples/system-fly", + "examples/system-simple-movement", +] [[test.genesis]] address = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 313f05a..58d767e 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -227,7 +227,7 @@ export async function ApplySystem({ systemId, entities, extraAccounts, - args = {}, + args, }: { authority: PublicKey; systemId: PublicKey; diff --git a/tests/bolt.ts b/tests/bolt.ts index d42701f..db6965f 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -50,27 +50,27 @@ function padCenter(value: string, width: number) { } function logPosition(title: string, { x, y, z }: { x: BN; y: BN; z: BN }) { - console.log("+----------------------------+"); - console.log(`| ${padCenter(title, 20)} |`); - console.log("+---------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+---------------+------------+"); + console.log(" +----------------------------+"); + console.log(` | ${padCenter(title, 26)} |`); + console.log(" +---------------+------------+"); + console.log(` | X Position | ${String(x).padEnd(10, " ")} |`); + console.log(` | Y Position | ${String(y).padEnd(10, " ")} |`); + console.log(` | Z Position | ${String(z).padEnd(10, " ")} |`); + console.log(" +---------------+------------+"); } function logVelocity( title: string, { x, y, z, lastApplied }: { x: BN; y: BN; z: BN; lastApplied: BN } ) { - console.log("+----------------------------+"); - console.log(`| ${padCenter(title, 20)} |`); - console.log("+---------------+------------+"); - console.log(`| X Velocity | ${String(x).padEnd(10, " ")} |`); - console.log(`| Y Velocity | ${String(y).padEnd(10, " ")} |`); - console.log(`| Z Velocity | ${String(z).padEnd(10, " ")} |`); - console.log(`| Last Applied | ${String(lastApplied).padEnd(10, " ")} |`); - console.log("+---------------+------------+"); + console.log(" +----------------------------+"); + console.log(` | ${padCenter(title, 26)} |`); + console.log(" +---------------+------------+"); + console.log(` | X Velocity | ${String(x).padEnd(10, " ")} |`); + console.log(` | Y Velocity | ${String(y).padEnd(10, " ")} |`); + console.log(` | Z Velocity | ${String(z).padEnd(10, " ")} |`); + console.log(` | Last Applied | ${String(lastApplied).padEnd(10, " ")} |`); + console.log(" +---------------+------------+"); } describe("bolt", () => { @@ -184,7 +184,7 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, - //seed: "origin-component", + seed: "origin-component", componentId: boltComponentProgram.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); @@ -194,7 +194,7 @@ describe("bolt", () => { const inititializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity2Pda, - //seed: "origin-component", + seed: "origin-component", componentId: boltComponentProgram.programId, }); await provider.sendAndConfirm(inititializeComponent.transaction); From bba01f4e3977a673706693d657eb7474451e6d8a Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 18:01:20 +0100 Subject: [PATCH 17/31] up --- package.json | 2 +- tests/bolt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf6df6f..3db2601 100644 --- a/package.json +++ b/package.json @@ -30,4 +30,4 @@ }, "license": "MIT", "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" -} \ No newline at end of file +} diff --git a/tests/bolt.ts b/tests/bolt.ts index db6965f..8af5ba8 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -4,7 +4,7 @@ import { type PublicKey } from "@solana/web3.js"; import { type Position } from "../target/types/position"; import { type Velocity } from "../target/types/velocity"; import { type BoltComponent } from "../target/types/bolt_component"; -import { SystemSimpleMovement } from "../target/types/system_simple_movement"; +import { type SystemSimpleMovement } from "../target/types/system_simple_movement"; import { type SystemFly } from "../target/types/system_fly"; import { type SystemApplyVelocity } from "../target/types/system_apply_velocity"; import { type World } from "../target/types/world"; From c46afba1f90cc9937425076bfd814d2e6b981ecd Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 18:08:37 +0100 Subject: [PATCH 18/31] fix bolt init output for new api --- cli/src/rust_template.rs | 72 ++++++++++++---------- clients/bolt-sdk/src/world/transactions.ts | 1 - 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/cli/src/rust_template.rs b/cli/src/rust_template.rs index 0a0e536..1d7ff0f 100644 --- a/cli/src/rust_template.rs +++ b/cli/src/rust_template.rs @@ -410,7 +410,6 @@ import {{ AddEntity, InitializeComponent, ApplySystem, - FindComponentPda, }} from "@magicblock-labs/bolt-sdk" import {{expect}} from "chai"; @@ -422,6 +421,7 @@ describe("{}", () => {{ // Constants used to test the program. let worldPda: PublicKey; let entityPda: PublicKey; + let componentPda: PublicKey; const positionComponent = anchor.workspace.Position as Program; const systemMovement = anchor.workspace.Movement as Program; @@ -437,47 +437,51 @@ describe("{}", () => {{ }}); it("Add an entity", async () => {{ - const addEntity = await AddEntity({{ - payer: provider.wallet.publicKey, - world: worldPda, - connection: provider.connection, - }}); - const txSign = await provider.sendAndConfirm(addEntity.transaction); - entityPda = addEntity.entityPda; - console.log(`Initialized a new Entity (ID=${{addEntity.entityId}}). Initialization signature: ${{txSign}}`); + const addEntity = await AddEntity({{ + payer: provider.wallet.publicKey, + world: worldPda, + connection: provider.connection, + }}); + const txSign = await provider.sendAndConfirm(addEntity.transaction); + entityPda = addEntity.entityPda; + console.log(`Initialized a new Entity (ID=${{addEntity.entityId}}). Initialization signature: ${{txSign}}`); }}); it("Add a component", async () => {{ - const initComponent = await InitializeComponent({{ - payer: provider.wallet.publicKey, - entity: entityPda, - componentId: positionComponent.programId, - }}); - const txSign = await provider.sendAndConfirm(initComponent.transaction); - console.log(`Initialized the grid component. Initialization signature: ${{txSign}}`); + const inititializeComponent = await InitializeComponent({{ + payer: provider.wallet.publicKey, + entity: entityPda, + componentId: positionComponent.programId, + }}); + const txSign = await provider.sendAndConfirm(inititializeComponent.transaction); + componentPda = inititializeComponent.componentPda; + console.log(`Initialized the grid component. Initialization signature: ${{txSign}}`); }}); it("Apply a system", async () => {{ - const positionComponentPda = FindComponentPda(positionComponent.programId, entityPda); - // Check that the component has been initialized and x is 0 - let positionData = await positionComponent.account.position.fetch( - positionComponentPda - ); - - const applySystem = await ApplySystem({{ - authority: provider.wallet.publicKey, - system: systemMovement.programId, + // Check that the component has been initialized and x is 0 + const positionBefore = await positionComponent.account.position.fetch( + componentPda + ); + expect(positionBefore.x.toNumber()).to.equal(0); + + // Run the movement system + const applySystem = await ApplySystem({{ + authority: provider.wallet.publicKey, + systemId: systemMovement.programId, + entities: [{{ entity: entityPda, components: [positionComponent.programId], - }}); - const txSign = await provider.sendAndConfirm(applySystem.transaction); - console.log(`Applied a system. Signature: ${{txSign}}`); - - // Check that the system has been applied and x is > 0 - positionData = await positionComponent.account.position.fetch( - positionComponentPda - ); - expect(positionData.x.toNumber()).to.gt(0); + }}] + }}); + const txSign = await provider.sendAndConfirm(applySystem.transaction); + console.log(`Applied a system. Signature: ${{txSign}}`); + + // Check that the system has been applied and x is > 0 + const positionAfter = await positionComponent.account.position.fetch( + componentPda + ); + expect(positionAfter.x.toNumber()).to.gt(0); }}); }}); diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 4c17eb4..2a66dd2 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -122,7 +122,6 @@ export async function InitializeComponent({ authority: authority ?? PROGRAM_ID, instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts, - instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, }); return { From 3b77834ccaea43866c5961b2bd18e07202e3ffc5 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 19:03:00 +0100 Subject: [PATCH 19/31] cleanup api --- clients/bolt-sdk/src/index.ts | 76 +++++++++++----------- clients/bolt-sdk/src/world/transactions.ts | 21 +++--- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 5dc313c..08b5322 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -11,64 +11,66 @@ export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey( "Sysvar1nstructions1111111111111111111111111" ); -export function FindWorldRegistryPda( - programId: PublicKey = new PublicKey(PROGRAM_ID) -) { +export function FindWorldRegistryPda({ programId }: { programId?: PublicKey }) { return PublicKey.findProgramAddressSync( [Buffer.from("registry")], - programId + programId ?? PROGRAM_ID )[0]; } -export function FindWorldPda( - id: BN | string | number | Uint8Array, - programId: PublicKey = new PublicKey(PROGRAM_ID) -) { - id = CastToBN(id); - const idBuffer = Buffer.from(id.toArrayLike(Buffer, "be", 8)); +export function FindWorldPda({ + worldId, + programId, +}: { + worldId: BN; + programId?: PublicKey; +}) { + const idBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8)); return PublicKey.findProgramAddressSync( [Buffer.from("world"), idBuffer], - programId + programId ?? PROGRAM_ID )[0]; } -export function FindEntityPda( - worldId: BN | string | number | Uint8Array, - entityId: BN | string | number | Uint8Array, - extraSeed?: string, - programId: PublicKey = new PublicKey(PROGRAM_ID) -) { - worldId = CastToBN(worldId); - entityId = CastToBN(entityId); +export function FindEntityPda({ + worldId, + entityId, + seed, + programId, +}: { + worldId: BN; + entityId?: BN; + seed?: string; + programId?: PublicKey; +}) { const worldIdBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8)); const seeds = [Buffer.from("entity"), worldIdBuffer]; - if (extraSeed != null) { + if (seed !== undefined) { seeds.push(Buffer.from(new Uint8Array(8))); - seeds.push(Buffer.from(extraSeed)); - } else { + seeds.push(Buffer.from(seed)); + } else if (entityId !== undefined) { seeds.push(Buffer.from(entityId.toArrayLike(Buffer, "be", 8))); + } else { + throw new Error("An entity must have either an Id or a Seed"); } - return PublicKey.findProgramAddressSync(seeds, programId)[0]; + return PublicKey.findProgramAddressSync(seeds, programId ?? PROGRAM_ID)[0]; } -export function FindComponentPda( - componentProgramId: PublicKey, - entity: PublicKey, - componentId: string = "" -) { +export function FindComponentPda({ + componentId, + entity, + seed, +}: { + componentId: PublicKey; + entity: PublicKey; + seed?: string; +}) { return PublicKey.findProgramAddressSync( - [Buffer.from(componentId), entity.toBytes()], - componentProgramId + [Buffer.from(seed ?? ""), entity.toBytes()], + componentId )[0]; } -function CastToBN(id: BN | string | number | Uint8Array) { - if (!(id instanceof BN)) { - id = new BN(id); - } - return id; -} - /** * Serialize arguments to a buffer * @param args diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 2a66dd2..45a355b 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -35,10 +35,13 @@ export async function InitializeNewWorld({ }: { payer: PublicKey; connection: Connection; -}): Promise<{ transaction: Transaction; worldPda: PublicKey }> { - const registryPda = FindWorldRegistryPda(); +}): Promise<{ transaction: Transaction; worldPda: PublicKey; worldId: BN }> { + const registryPda = FindWorldRegistryPda({}); const registry = await Registry.fromAccountAddress(connection, registryPda); - const worldPda = FindWorldPda(new BN(registry.worlds)); + const worldId = new BN(registry.worlds); + const worldPda = FindWorldPda({ + worldId, + }); const initializeWorldIx = createInitializeNewWorldInstruction({ world: worldPda, registry: registryPda, @@ -47,6 +50,7 @@ export async function InitializeNewWorld({ return { transaction: new Transaction().add(initializeWorldIx), worldPda, + worldId, }; } @@ -69,11 +73,10 @@ export async function AddEntity({ connection: Connection; }): Promise<{ transaction: Transaction; entityPda: PublicKey }> { const worldInstance = await World.fromAccountAddress(connection, world); - const entityPda = FindEntityPda( - new BN(worldInstance.id), - new BN(worldInstance.entities), - seed - ); + const worldId = new BN(worldInstance.id); + const entityPda = seed + ? FindEntityPda({ worldId, seed }) + : FindEntityPda({ worldId, entityId: new BN(worldInstance.entities) }); const createEntityIx = createAddEntityInstruction( { world, @@ -113,7 +116,7 @@ export async function InitializeComponent({ authority?: web3.PublicKey; anchorRemainingAccounts?: web3.AccountMeta[]; }): Promise<{ transaction: Transaction; componentPda: PublicKey }> { - const componentPda = FindComponentPda(componentId, entity, seed); + const componentPda = FindComponentPda({ componentId, entity, seed }); const initComponentIx = createInitializeComponentInstruction({ payer, entity, From 1b70434f7a7748656358988fde740da9b1355958 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Fri, 14 Jun 2024 19:41:16 +0100 Subject: [PATCH 20/31] polish new api --- clients/bolt-sdk/src/index.ts | 5 +- clients/bolt-sdk/src/world/transactions.ts | 18 ++++---- tests/bolt.ts | 54 +++++++++------------- 3 files changed, 35 insertions(+), 42 deletions(-) diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index 08b5322..d8aea2e 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -1,5 +1,5 @@ import { PublicKey } from "@solana/web3.js"; -import BN from "bn.js"; +import type BN from "bn.js"; import { PROGRAM_ID } from "./generated"; export * from "./generated/accounts"; export * from "./generated/instructions"; @@ -49,7 +49,8 @@ export function FindEntityPda({ seeds.push(Buffer.from(new Uint8Array(8))); seeds.push(Buffer.from(seed)); } else if (entityId !== undefined) { - seeds.push(Buffer.from(entityId.toArrayLike(Buffer, "be", 8))); + const entityIdBuffer = Buffer.from(entityId.toArrayLike(Buffer, "be", 8)); + seeds.push(entityIdBuffer); } else { throw new Error("An entity must have either an Id or a Seed"); } diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 45a355b..335ce66 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -74,9 +74,10 @@ export async function AddEntity({ }): Promise<{ transaction: Transaction; entityPda: PublicKey }> { const worldInstance = await World.fromAccountAddress(connection, world); const worldId = new BN(worldInstance.id); - const entityPda = seed - ? FindEntityPda({ worldId, seed }) - : FindEntityPda({ worldId, entityId: new BN(worldInstance.entities) }); + const entityPda = + seed !== undefined + ? FindEntityPda({ worldId, seed }) + : FindEntityPda({ worldId, entityId: new BN(worldInstance.entities) }); const createEntityIx = createAddEntityInstruction( { world, @@ -126,7 +127,6 @@ export async function InitializeComponent({ instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, anchorRemainingAccounts, }); - return { transaction: new Transaction().add(initComponentIx), componentPda, @@ -182,11 +182,11 @@ function createApplySystemInstruction({ entities.forEach(function (entity) { entity.components.forEach(function (component) { - const componentPda = FindComponentPda( - component.id, - entity.entity, - component.seed ?? "" - ); + const componentPda = FindComponentPda({ + componentId: component.id, + entity: entity.entity, + seed: component.seed, + }); instructionArgs[ getBoltComponentProgramName(componentCount, componentCount) ] = component.id; diff --git a/tests/bolt.ts b/tests/bolt.ts index 8af5ba8..75fca8e 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -13,6 +13,7 @@ import BN from "bn.js"; import { AddEntity, createDelegateInstruction, + createUndelegateInstruction, createInitializeRegistryInstruction, DELEGATION_PROGRAM_ID, FindComponentPda, @@ -21,7 +22,6 @@ import { InitializeNewWorld, SYSVAR_INSTRUCTIONS_PUBKEY, } from "../clients/bolt-sdk"; -import { createUndelegateInstruction } from "../clients/bolt-sdk/lib/delegation/undelegate"; import { ApplySystem } from "../clients/bolt-sdk/src"; enum Direction { @@ -31,46 +31,38 @@ enum Direction { Down = "Down", } -function serializeArgs(args: any = {}) { - const jsonString = JSON.stringify(args); - const encoder = new TextEncoder(); - const binaryData = encoder.encode(jsonString); - return Buffer.from( - binaryData.buffer, - binaryData.byteOffset, - binaryData.byteLength - ); -} - function padCenter(value: string, width: number) { const length = value.length; + if (width <= length) { + return value; + } const padding = (width - length) / 2; const align = length - padding; return value.padEnd(align, " ").padStart(width, " "); } function logPosition(title: string, { x, y, z }: { x: BN; y: BN; z: BN }) { - console.log(" +----------------------------+"); - console.log(` | ${padCenter(title, 26)} |`); - console.log(" +---------------+------------+"); - console.log(` | X Position | ${String(x).padEnd(10, " ")} |`); - console.log(` | Y Position | ${String(y).padEnd(10, " ")} |`); - console.log(` | Z Position | ${String(z).padEnd(10, " ")} |`); - console.log(" +---------------+------------+"); + console.log(" +----------------------------------+"); + console.log(` | ${padCenter(title, 32)} |`); + console.log(" +-----------------+----------------+"); + console.log(` | X Position | ${String(x).padEnd(14, " ")} |`); + console.log(` | Y Position | ${String(y).padEnd(14, " ")} |`); + console.log(` | Z Position | ${String(z).padEnd(14, " ")} |`); + console.log(" +-----------------+----------------+"); } function logVelocity( title: string, { x, y, z, lastApplied }: { x: BN; y: BN; z: BN; lastApplied: BN } ) { - console.log(" +----------------------------+"); - console.log(` | ${padCenter(title, 26)} |`); - console.log(" +---------------+------------+"); - console.log(` | X Velocity | ${String(x).padEnd(10, " ")} |`); - console.log(` | Y Velocity | ${String(y).padEnd(10, " ")} |`); - console.log(` | Z Velocity | ${String(z).padEnd(10, " ")} |`); - console.log(` | Last Applied | ${String(lastApplied).padEnd(10, " ")} |`); - console.log(" +---------------+------------+"); + console.log(" +----------------------------------+"); + console.log(` | ${padCenter(title, 32)} |`); + console.log(" +-----------------+----------------+"); + console.log(` | X Velocity | ${String(x).padEnd(14, " ")} |`); + console.log(` | Y Velocity | ${String(y).padEnd(14, " ")} |`); + console.log(` | Z Velocity | ${String(z).padEnd(14, " ")} |`); + console.log(` | Last Applied | ${String(lastApplied).padEnd(14, " ")} |`); + console.log(" +-----------------+----------------+"); } describe("bolt", () => { @@ -105,7 +97,7 @@ describe("bolt", () => { let componentVelocityEntity1Pda: PublicKey; it("InitializeWorldsRegistry", async () => { - const registryPda = FindWorldRegistryPda(boltWorld.programId); + const registryPda = FindWorldRegistryPda({}); const initializeRegistryIx = createInitializeRegistryInstruction({ registry: registryPda, payer: provider.wallet.publicKey, @@ -164,7 +156,7 @@ describe("bolt", () => { const addEntity = await AddEntity({ payer: provider.wallet.publicKey, world: worldPda, - seed: "extra-seed", // TODO(vbrunet) - extra seed doesn't work for some reason? + seed: "extra-seed", connection: provider.connection, }); await provider.sendAndConfirm(addEntity.transaction); @@ -439,7 +431,7 @@ describe("bolt", () => { }) .rpc(); } catch (e) { - console.log("ERROR:", e); + console.log("Check invalid init without CPI: error:", e); invalid = true; } expect(invalid).to.equal(true); @@ -462,7 +454,7 @@ describe("bolt", () => { }) .rpc(); } catch (e) { - console.log("ERROR2:", e); + console.log("Check invalid update without CPI: error:", e); invalid = true; } expect(invalid).to.equal(true); From 695ea9397bd8e0dc7863d1a2a81d8b1d33dce5cd Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 08:30:07 +0100 Subject: [PATCH 21/31] fix variable name typo --- cli/src/rust_template.rs | 8 ++-- clients/bolt-sdk/src/world/transactions.ts | 2 +- tests/bolt.ts | 48 +++++++++++----------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cli/src/rust_template.rs b/cli/src/rust_template.rs index 1d7ff0f..91062ac 100644 --- a/cli/src/rust_template.rs +++ b/cli/src/rust_template.rs @@ -448,13 +448,13 @@ describe("{}", () => {{ }}); it("Add a component", async () => {{ - const inititializeComponent = await InitializeComponent({{ + const initializeComponent = await InitializeComponent({{ payer: provider.wallet.publicKey, entity: entityPda, componentId: positionComponent.programId, }}); - const txSign = await provider.sendAndConfirm(inititializeComponent.transaction); - componentPda = inititializeComponent.componentPda; + const txSign = await provider.sendAndConfirm(initializeComponent.transaction); + componentPda = initializeComponent.componentPda; console.log(`Initialized the grid component. Initialization signature: ${{txSign}}`); }}); @@ -471,7 +471,7 @@ describe("{}", () => {{ systemId: systemMovement.programId, entities: [{{ entity: entityPda, - components: [positionComponent.programId], + components: [{{ componentId: positionComponent.programId }}], }}] }}); const txSign = await provider.sendAndConfirm(applySystem.transaction); diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 335ce66..5dfd173 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -213,7 +213,7 @@ interface ApplySystemEntity { components: ApplySystemComponent[]; } interface ApplySystemComponent { - id: PublicKey; + componentId: PublicKey; seed?: string; } diff --git a/tests/bolt.ts b/tests/bolt.ts index 75fca8e..d7c8708 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -37,8 +37,8 @@ function padCenter(value: string, width: number) { return value; } const padding = (width - length) / 2; - const align = length - padding; - return value.padEnd(align, " ").padStart(width, " "); + const align = width - padding; + return value.padStart(align, " ").padEnd(width, " "); } function logPosition(title: string, { x, y, z }: { x: BN; y: BN; z: BN }) { @@ -173,61 +173,61 @@ describe("bolt", () => { }); it("Initialize Original Component on Entity 1, trough the world instance", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, seed: "origin-component", componentId: boltComponentProgram.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); + await provider.sendAndConfirm(initializeComponent.transaction); }); it("Initialize Original Component on Entity 2, trough the world instance", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity2Pda, seed: "origin-component", componentId: boltComponentProgram.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); + await provider.sendAndConfirm(initializeComponent.transaction); }); it("Initialize Position Component on Entity 1", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, componentId: exampleComponentPosition.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); - componentPositionEntity1Pda = inititializeComponent.componentPda; // Saved for later + await provider.sendAndConfirm(initializeComponent.transaction); + componentPositionEntity1Pda = initializeComponent.componentPda; // Saved for later }); it("Initialize Velocity Component on Entity 1", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, componentId: exampleComponentVelocity.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); + await provider.sendAndConfirm(initializeComponent.transaction); }); it("Initialize Position Component on Entity 2", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity2Pda, componentId: exampleComponentPosition.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); - componentPositionEntity2Pda = inititializeComponent.componentPda; // Saved for later + await provider.sendAndConfirm(initializeComponent.transaction); + componentPositionEntity2Pda = initializeComponent.componentPda; // Saved for later }); it("Initialize Position Component on Entity 5", async () => { - const inititializeComponent = await InitializeComponent({ + const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity5Pda, componentId: exampleComponentPosition.programId, }); - await provider.sendAndConfirm(inititializeComponent.transaction); + await provider.sendAndConfirm(initializeComponent.transaction); }); it("Check Position on Entity 1 is default", async () => { @@ -246,7 +246,7 @@ describe("bolt", () => { entities: [ { entity: entity1Pda, - components: [{ id: exampleComponentPosition.programId }], + components: [{ componentId: exampleComponentPosition.programId }], }, ], args: { @@ -271,7 +271,7 @@ describe("bolt", () => { entities: [ { entity: entity1Pda, - components: [{ id: exampleComponentPosition.programId }], + components: [{ componentId: exampleComponentPosition.programId }], }, ], args: { @@ -296,7 +296,7 @@ describe("bolt", () => { entities: [ { entity: entity1Pda, - components: [{ id: exampleComponentPosition.programId }], + components: [{ componentId: exampleComponentPosition.programId }], }, ], }); @@ -319,8 +319,8 @@ describe("bolt", () => { { entity: entity1Pda, components: [ - { id: exampleComponentVelocity.programId }, - { id: exampleComponentPosition.programId }, + { componentId: exampleComponentVelocity.programId }, + { componentId: exampleComponentPosition.programId }, ], }, ], @@ -353,8 +353,8 @@ describe("bolt", () => { { entity: entity1Pda, components: [ - { id: exampleComponentVelocity.programId }, - { id: exampleComponentPosition.programId }, + { componentId: exampleComponentVelocity.programId }, + { componentId: exampleComponentPosition.programId }, ], }, ], @@ -392,7 +392,7 @@ describe("bolt", () => { entities: [ { entity: entity5Pda, - components: [{ id: exampleComponentPosition.programId }], + components: [{ componentId: exampleComponentPosition.programId }], }, ], }); From ef603a4562e7d160069f8b3fd93327adbe47ca48 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 08:41:25 +0100 Subject: [PATCH 22/31] fixing tests --- clients/bolt-sdk/src/index.ts | 3 +- clients/bolt-sdk/src/world/transactions.ts | 20 +- tests/bolt.js | 515 --------------------- tests/bolt.ts | 4 +- 4 files changed, 13 insertions(+), 529 deletions(-) delete mode 100644 tests/bolt.js diff --git a/clients/bolt-sdk/src/index.ts b/clients/bolt-sdk/src/index.ts index d8aea2e..6d62a13 100644 --- a/clients/bolt-sdk/src/index.ts +++ b/clients/bolt-sdk/src/index.ts @@ -6,12 +6,13 @@ export * from "./generated/instructions"; export * from "./world/transactions"; export * from "./delegation/accounts"; export * from "./delegation/delegate"; +export * from "./delegation/undelegate"; export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey( "Sysvar1nstructions1111111111111111111111111" ); -export function FindWorldRegistryPda({ programId }: { programId?: PublicKey }) { +export function FindRegistryPda({ programId }: { programId?: PublicKey }) { return PublicKey.findProgramAddressSync( [Buffer.from("registry")], programId ?? PROGRAM_ID diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 5dfd173..045a966 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -10,7 +10,7 @@ import { FindComponentPda, FindEntityPda, FindWorldPda, - FindWorldRegistryPda, + FindRegistryPda, Registry, SerializeArgs, SYSVAR_INSTRUCTIONS_PUBKEY, @@ -36,12 +36,10 @@ export async function InitializeNewWorld({ payer: PublicKey; connection: Connection; }): Promise<{ transaction: Transaction; worldPda: PublicKey; worldId: BN }> { - const registryPda = FindWorldRegistryPda({}); + const registryPda = FindRegistryPda({}); const registry = await Registry.fromAccountAddress(connection, registryPda); const worldId = new BN(registry.worlds); - const worldPda = FindWorldPda({ - worldId, - }); + const worldPda = FindWorldPda({ worldId }); const initializeWorldIx = createInitializeNewWorldInstruction({ world: worldPda, registry: registryPda, @@ -78,7 +76,7 @@ export async function AddEntity({ seed !== undefined ? FindEntityPda({ worldId, seed }) : FindEntityPda({ worldId, entityId: new BN(worldInstance.entities) }); - const createEntityIx = createAddEntityInstruction( + const addEntityIx = createAddEntityInstruction( { world, payer, @@ -87,7 +85,7 @@ export async function AddEntity({ { extraSeed: seed ?? null } ); return { - transaction: new Transaction().add(createEntityIx), + transaction: new Transaction().add(addEntityIx), entityPda, }; } @@ -118,7 +116,7 @@ export async function InitializeComponent({ anchorRemainingAccounts?: web3.AccountMeta[]; }): Promise<{ transaction: Transaction; componentPda: PublicKey }> { const componentPda = FindComponentPda({ componentId, entity, seed }); - const initComponentIx = createInitializeComponentInstruction({ + const initializeComponentIx = createInitializeComponentInstruction({ payer, entity, data: componentPda, @@ -128,7 +126,7 @@ export async function InitializeComponent({ anchorRemainingAccounts, }); return { - transaction: new Transaction().add(initComponentIx), + transaction: new Transaction().add(initializeComponentIx), componentPda, }; } @@ -183,13 +181,13 @@ function createApplySystemInstruction({ entities.forEach(function (entity) { entity.components.forEach(function (component) { const componentPda = FindComponentPda({ - componentId: component.id, + componentId: component.componentId, entity: entity.entity, seed: component.seed, }); instructionArgs[ getBoltComponentProgramName(componentCount, componentCount) - ] = component.id; + ] = component.componentId; instructionArgs[getBoltComponentName(componentCount, componentCount)] = componentPda; }); diff --git a/tests/bolt.js b/tests/bolt.js deleted file mode 100644 index 41b1a95..0000000 --- a/tests/bolt.js +++ /dev/null @@ -1,515 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if ( - !desc || - ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { - desc = { - enumerable: true, - get: function () { - return m[k]; - }, - }; - } - Object.defineProperty(o, k2, desc); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const anchor = __importStar(require("@coral-xyz/anchor")); -const web3_js_1 = require("@solana/web3.js"); -const chai_1 = require("chai"); -const bn_js_1 = __importDefault(require("bn.js")); -var Direction; -(function (Direction) { - Direction["Left"] = "Left"; - Direction["Right"] = "Right"; - Direction["Up"] = "Up"; - Direction["Down"] = "Down"; -})(Direction || (Direction = {})); -function serializeArgs(args = {}) { - const jsonString = JSON.stringify(args); - const encoder = new TextEncoder(); - const binaryData = encoder.encode(jsonString); - return Buffer.from( - binaryData.buffer, - binaryData.byteOffset, - binaryData.byteLength - ); -} -describe("bolt", () => { - const provider = anchor.AnchorProvider.env(); - anchor.setProvider(provider); - const worldProgram = anchor.workspace.World; - const boltComponentPositionProgram = anchor.workspace.ComponentPosition; - const boltComponentVelocityProgram = anchor.workspace.ComponentVelocity; - const boltComponentProgramOrigin = anchor.workspace.BoltComponent; - const systemSimpleMovement = anchor.workspace.SystemSimpleMovement.programId; - const systemFly = anchor.workspace.SystemFly.programId; - const applyVelocity = anchor.workspace.SystemApplyVelocity.programId; - let entity1; - let entity2; - let componentPositionEntity1; - let componentPositionEntity2; - let componentVelocityEntity1; - it("InitializeWorldsRegistry", () => - __awaiter(void 0, void 0, void 0, function* () { - const registryPda = FindWorldRegistryPda(worldProgram); - yield worldProgram.methods - .initializeRegistry() - .accounts({ - registry: registryPda, - payer: provider.wallet.publicKey, - }) - .rpc(); - })); - it("InitializeNewWorld", () => - __awaiter(void 0, void 0, void 0, function* () { - const registryPda = FindWorldRegistryPda(worldProgram); - const worldPda = FindWorldPda(worldProgram, new bn_js_1.default(0)); - yield worldProgram.methods - .initializeNewWorld() - .accounts({ - world: worldPda, - registry: registryPda, - payer: provider.wallet.publicKey, - }) - .rpc(); - })); - it("Add entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - const worldPda = FindWorldPda(worldProgram, new bn_js_1.default(0)); - entity1 = FindEntityPda( - worldProgram, - new bn_js_1.default(0), - new bn_js_1.default(0) - ); - yield worldProgram.methods - .addEntity() - .accounts({ - world: worldPda, - entity: entity1, - payer: provider.wallet.publicKey, - }) - .rpc(); - })); - it("Add entity 2", () => - __awaiter(void 0, void 0, void 0, function* () { - const worldPda = FindWorldPda(worldProgram, new bn_js_1.default(0)); - entity2 = FindEntityPda( - worldProgram, - new bn_js_1.default(0), - new bn_js_1.default(1) - ); - yield worldProgram.methods - .addEntity() - .accounts({ - world: worldPda, - entity: entity2, - payer: provider.wallet.publicKey, - }) - .rpc(); - })); - it("Add entity 3", () => - __awaiter(void 0, void 0, void 0, function* () { - const worldPda = FindWorldPda(worldProgram, new bn_js_1.default(0)); - const entityPda = FindEntityPda( - worldProgram, - new bn_js_1.default(0), - new bn_js_1.default(2) - ); - yield worldProgram.methods - .addEntity() - .accounts({ - world: worldPda, - entity: entityPda, - payer: provider.wallet.publicKey, - }) - .rpc(); - })); - it("Initialize Original Component on Entity 1, trough the world instance", () => - __awaiter(void 0, void 0, void 0, function* () { - let componentEntity1 = FindComponentPda( - boltComponentProgramOrigin.programId, - entity1, - "origin-component" - ); - yield worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentEntity1, - componentProgram: boltComponentProgramOrigin.programId, - entity: entity1, - }) - .rpc(); - })); - it("Initialize Original Component on Entity 2, trough the world instance", () => - __awaiter(void 0, void 0, void 0, function* () { - let componentEntity2 = FindComponentPda( - boltComponentProgramOrigin.programId, - entity2, - "origin-component" - ); - yield worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentEntity2, - componentProgram: boltComponentProgramOrigin.programId, - entity: entity2, - }) - .rpc(); - })); - it("Initialize Position Component on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - componentPositionEntity1 = FindComponentPda( - boltComponentPositionProgram.programId, - entity1, - "component-position" - ); - console.log( - "Component Position E1: ", - componentPositionEntity1.toBase58() - ); - yield worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentPositionEntity1, - componentProgram: boltComponentPositionProgram.programId, - entity: entity1, - }) - .rpc(); - })); - it("Initialize Velocity Component on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - componentVelocityEntity1 = FindComponentPda( - boltComponentVelocityProgram.programId, - entity1, - "component-velocity" - ); - yield worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentVelocityEntity1, - componentProgram: boltComponentVelocityProgram.programId, - entity: entity1, - }) - .rpc(); - })); - it("Initialize Position Component on Entity 2", () => - __awaiter(void 0, void 0, void 0, function* () { - componentPositionEntity2 = FindComponentPda( - boltComponentPositionProgram.programId, - entity2, - "component-position" - ); - yield worldProgram.methods - .initializeComponent() - .accounts({ - payer: provider.wallet.publicKey, - data: componentPositionEntity2, - componentProgram: boltComponentPositionProgram.programId, - entity: entity2, - }) - .rpc(); - })); - it("Check Position on Entity 1 is default", () => - __awaiter(void 0, void 0, void 0, function* () { - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).x.toNumber() - ).to.equal(0); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).y.toNumber() - ).to.equal(0); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).z.toNumber() - ).to.equal(0); - })); - it("Simple Movement System and Up direction on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - const args = { - direction: Direction.Up, - }; - yield worldProgram.methods - .apply(serializeArgs(args)) // Move Up - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemSimpleMovement, - boltComponent: componentPositionEntity1, - }) - .rpc({ skipPreflight: true }); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).y.toNumber() - ).to.equal(1); - const componentData = - yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); - console.log("+-----------------------------+"); - console.log("| Movement System: Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - })); - it("Simple Movement System and Right direction on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - const args = { - direction: Direction.Right, - }; - yield worldProgram.methods - .apply(serializeArgs(args)) // Move Right - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemSimpleMovement, - boltComponent: componentPositionEntity1, - }) - .rpc({ skipPreflight: true }); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).y.toNumber() - ).to.equal(1); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).y.toNumber() - ).to.equal(1); - const componentData = - yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); - console.log("+-----------------------------+"); - console.log("| Movement System: Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - })); - it("Fly System on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - yield worldProgram.methods - .apply(Buffer.alloc(0)) // Move Up - .accounts({ - componentProgram: boltComponentPositionProgram.programId, - boltSystem: systemFly, - boltComponent: componentPositionEntity1, - }) - .rpc(); - (0, chai_1.expect)( - (yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - )).z.toNumber() - ).to.equal(1); - const componentData = - yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - const x = componentData.x.toNumber(); - const y = componentData.y.toNumber(); - const z = componentData.z.toNumber(); - console.log("+-----------------------------+"); - console.log("| Fly: Position Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - })); - it("Apply Velocity on Entity 1", () => - __awaiter(void 0, void 0, void 0, function* () { - yield worldProgram.methods - .apply2(Buffer.alloc(0)) - .accounts({ - componentProgram1: boltComponentVelocityProgram.programId, - componentProgram2: boltComponentPositionProgram.programId, - boltSystem: applyVelocity, - boltComponent1: componentVelocityEntity1, - boltComponent2: componentPositionEntity1, - }) - .remainingAccounts([ - { - pubkey: componentPositionEntity1, - isWritable: false, - isSigner: false, - }, - ]) - .rpc(); - console.log("Component Velocity: ", componentVelocityEntity1.toBase58()); - let componentData = - yield boltComponentVelocityProgram.account.velocity.fetch( - componentVelocityEntity1 - ); - let x = componentData.x.toNumber(); - let y = componentData.y.toNumber(); - let z = componentData.z.toNumber(); - const tmp = componentData.lastApplied.toNumber(); - console.log("+-----------------------------+"); - console.log("| Apply Velocity: Velocity Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Timestamp | ${String(tmp).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - let positionData = - yield boltComponentPositionProgram.account.position.fetch( - componentPositionEntity1 - ); - x = positionData.x.toNumber(); - y = positionData.y.toNumber(); - z = positionData.z.toNumber(); - console.log("+-----------------------------+"); - console.log("| Apply Velocity: Position Entity 1 |"); - console.log("+----------------+------------+"); - console.log("| Coordinate | Value |"); - console.log("+----------------+------------+"); - console.log(`| X Position | ${String(x).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`); - console.log("| | |"); - console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`); - console.log("+----------------+------------+"); - console.log("| |"); - console.log("+-----------------------------+"); - })); - // Utils - function FindWorldRegistryPda(program) { - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from("registry")], - program.programId - )[0]; - } - function FindWorldPda(program, id) { - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from("world"), id.toBuffer("le", 8)], - program.programId - )[0]; - } - function FindEntityPda(program, worldId, entityId) { - return web3_js_1.PublicKey.findProgramAddressSync( - [ - Buffer.from("entity"), - worldId.toBuffer("be", 8), - entityId.toBuffer("be", 8), - ], - program.programId - )[0]; - } - function FindComponentPda(program, entity, seed = "component") { - return web3_js_1.PublicKey.findProgramAddressSync( - [Buffer.from(seed), entity.toBytes()], - program - )[0]; - } -}); diff --git a/tests/bolt.ts b/tests/bolt.ts index d7c8708..10818a7 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -17,7 +17,7 @@ import { createInitializeRegistryInstruction, DELEGATION_PROGRAM_ID, FindComponentPda, - FindWorldRegistryPda, + FindRegistryPda, InitializeComponent, InitializeNewWorld, SYSVAR_INSTRUCTIONS_PUBKEY, @@ -97,7 +97,7 @@ describe("bolt", () => { let componentVelocityEntity1Pda: PublicKey; it("InitializeWorldsRegistry", async () => { - const registryPda = FindWorldRegistryPda({}); + const registryPda = FindRegistryPda({}); const initializeRegistryIx = createInitializeRegistryInstruction({ registry: registryPda, payer: provider.wallet.publicKey, From 674395003bd6ffbd8118a9e9ddddfb6e23b3cc0d Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 09:04:44 +0100 Subject: [PATCH 23/31] using seeds for velocity component --- tests/bolt.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index 10818a7..5f5b80b 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -96,7 +96,7 @@ describe("bolt", () => { let componentPositionEntity5Pda: PublicKey; let componentVelocityEntity1Pda: PublicKey; - it("InitializeWorldsRegistry", async () => { + it("InitializeRegistry", async () => { const registryPda = FindRegistryPda({}); const initializeRegistryIx = createInitializeRegistryInstruction({ registry: registryPda, @@ -207,6 +207,7 @@ describe("bolt", () => { payer: provider.wallet.publicKey, entity: entity1Pda, componentId: exampleComponentVelocity.programId, + seed: "component-velocity", }); await provider.sendAndConfirm(initializeComponent.transaction); }); @@ -319,7 +320,10 @@ describe("bolt", () => { { entity: entity1Pda, components: [ - { componentId: exampleComponentVelocity.programId }, + { + componentId: exampleComponentVelocity.programId, + seed: "component-velocity", + }, { componentId: exampleComponentPosition.programId }, ], }, @@ -353,7 +357,10 @@ describe("bolt", () => { { entity: entity1Pda, components: [ - { componentId: exampleComponentVelocity.programId }, + { + componentId: exampleComponentVelocity.programId, + seed: "component-velocity", + }, { componentId: exampleComponentPosition.programId }, ], }, @@ -440,10 +447,10 @@ describe("bolt", () => { // Check illegal call, without CPI it("Check invalid update without CPI", async () => { let invalid = false; - const componentVelocityEntity5 = FindComponentPda( - exampleComponentVelocity.programId, - entity5Pda - ); + const componentVelocityEntity5 = FindComponentPda({ + componentId: exampleComponentVelocity.programId, + entity: entity5Pda, + }); try { await boltComponentProgram.methods .update(null) From 86bda9ea804f2d6f642fd5c00b6ade72ab3ff00e Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 09:43:54 +0100 Subject: [PATCH 24/31] polishing tests --- tests/bolt.ts | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index 5f5b80b..2ca7799 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -88,13 +88,16 @@ describe("bolt", () => { ).programId; let worldPda: PublicKey; + let entity1Pda: PublicKey; let entity2Pda: PublicKey; let entity5Pda: PublicKey; + let componentPositionEntity1Pda: PublicKey; + let componentVelocityEntity1Pda: PublicKey; + let componentPositionEntity2Pda: PublicKey; let componentPositionEntity5Pda: PublicKey; - let componentVelocityEntity1Pda: PublicKey; it("InitializeRegistry", async () => { const registryPda = FindRegistryPda({}); @@ -152,7 +155,7 @@ describe("bolt", () => { await provider.sendAndConfirm(addEntity.transaction); }); - it("Add entity 4 with extra seeds", async () => { + it("Add entity 4 (with seed)", async () => { const addEntity = await AddEntity({ payer: provider.wallet.publicKey, world: worldPda, @@ -202,7 +205,7 @@ describe("bolt", () => { componentPositionEntity1Pda = initializeComponent.componentPda; // Saved for later }); - it("Initialize Velocity Component on Entity 1", async () => { + it("Initialize Velocity Component on Entity 1 (with seed)", async () => { const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity1Pda, @@ -210,6 +213,7 @@ describe("bolt", () => { seed: "component-velocity", }); await provider.sendAndConfirm(initializeComponent.transaction); + componentVelocityEntity1Pda = initializeComponent.componentPda; // Saved for later }); it("Initialize Position Component on Entity 2", async () => { @@ -222,19 +226,22 @@ describe("bolt", () => { componentPositionEntity2Pda = initializeComponent.componentPda; // Saved for later }); - it("Initialize Position Component on Entity 5", async () => { + it("Initialize Position Component on Entity 5 (with authority)", async () => { const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, entity: entity5Pda, componentId: exampleComponentPosition.programId, + authority: provider.wallet.publicKey, }); await provider.sendAndConfirm(initializeComponent.transaction); + componentPositionEntity5Pda = initializeComponent.componentPda; // Saved for later }); it("Check Position on Entity 1 is default", async () => { const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); + logPosition("Default State: Entity 1", position); expect(position.x.toNumber()).to.equal(0); expect(position.y.toNumber()).to.equal(0); expect(position.z.toNumber()).to.equal(0); @@ -334,7 +341,7 @@ describe("bolt", () => { const velocity = await exampleComponentVelocity.account.velocity.fetch( componentVelocityEntity1Pda ); - logVelocity("Apply System Velocity: Velocity Entity 1", velocity); + logVelocity("Apply System Velocity: Entity 1", velocity); expect(velocity.x.toNumber()).to.equal(0); expect(velocity.y.toNumber()).to.equal(0); expect(velocity.z.toNumber()).to.equal(0); @@ -343,7 +350,7 @@ describe("bolt", () => { const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - logPosition("Apply System Velocity: Position Entity 1", position); + logPosition("Apply System Velocity: Entity 1", position); expect(position.x.toNumber()).to.equal(1); expect(position.y.toNumber()).to.equal(1); expect(position.z.toNumber()).to.equal(1); @@ -387,7 +394,7 @@ describe("bolt", () => { }); // Check illegal authority usage - it("Check invalid component update", async () => { + it("Check invalid component update (Entity 5, wrong authority)", async () => { const positionBefore = await exampleComponentPosition.account.position.fetch( componentPositionEntity5Pda @@ -409,6 +416,7 @@ describe("bolt", () => { await provider.sendAndConfirm(applySystem.transaction); } catch (error) { failed = true; + console.log("error.message", error.message); expect(error.message).to.contain("Invalid authority"); } expect(failed).to.equal(true); @@ -437,8 +445,9 @@ describe("bolt", () => { authority: provider.wallet.publicKey, }) .rpc(); - } catch (e) { - console.log("Check invalid init without CPI: error:", e); + } catch (error) { + console.log("error.message", error.message); + // expect(error.message).to.contain("Invalid authority"); // TODO(vbrunet) - find correct error message invalid = true; } expect(invalid).to.equal(true); @@ -460,8 +469,9 @@ describe("bolt", () => { authority: provider.wallet.publicKey, }) .rpc(); - } catch (e) { - console.log("Check invalid update without CPI: error:", e); + } catch (error) { + console.log("error.message", error.message); + // expect(error.message).to.contain("Invalid authority"); // TODO(vbrunet) - find correct error message invalid = true; } expect(invalid).to.equal(true); From 592982ab0a8daaed997ad3b55460fac8151ebf98 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 09:56:55 +0100 Subject: [PATCH 25/31] saving progress before meeting --- tests/bolt.ts | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index 2ca7799..f1715d1 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -91,12 +91,14 @@ describe("bolt", () => { let entity1Pda: PublicKey; let entity2Pda: PublicKey; + let entity4Pda: PublicKey; let entity5Pda: PublicKey; let componentPositionEntity1Pda: PublicKey; let componentVelocityEntity1Pda: PublicKey; let componentPositionEntity2Pda: PublicKey; + let componentPositionEntity4Pda: PublicKey; let componentPositionEntity5Pda: PublicKey; it("InitializeRegistry", async () => { @@ -163,6 +165,7 @@ describe("bolt", () => { connection: provider.connection, }); await provider.sendAndConfirm(addEntity.transaction); + entity4Pda = addEntity.entityPda; }); it("Add entity 5", async () => { @@ -226,6 +229,16 @@ describe("bolt", () => { componentPositionEntity2Pda = initializeComponent.componentPda; // Saved for later }); + it("Initialize Position Component on Entity 4", async () => { + const initializeComponent = await InitializeComponent({ + payer: provider.wallet.publicKey, + entity: entity4Pda, + componentId: exampleComponentPosition.programId, + }); + await provider.sendAndConfirm(initializeComponent.transaction); + componentPositionEntity4Pda = initializeComponent.componentPda; // Saved for later + }); + it("Initialize Position Component on Entity 5 (with authority)", async () => { const initializeComponent = await InitializeComponent({ payer: provider.wallet.publicKey, @@ -393,8 +406,29 @@ describe("bolt", () => { expect(position.z.toNumber()).to.equal(300); }); - // Check illegal authority usage - it("Check invalid component update (Entity 5, wrong authority)", async () => { + it("Fly System on Entity 4", async () => { + const applySystem = await ApplySystem({ + authority: provider.wallet.publicKey, + systemId: exampleSystemFly, + entities: [ + { + entity: entity4Pda, + components: [{ componentId: exampleComponentPosition.programId }], + }, + ], + }); + await provider.sendAndConfirm(applySystem.transaction); + + const position = await exampleComponentPosition.account.position.fetch( + componentPositionEntity4Pda + ); + logPosition("Fly System: Entity 4", position); + expect(position.x.toNumber()).to.equal(1); + expect(position.y.toNumber()).to.equal(1); + expect(position.z.toNumber()).to.equal(1); + }); + + it("Fly System on Entity 5 (should fail with wrong authority)", async () => { const positionBefore = await exampleComponentPosition.account.position.fetch( componentPositionEntity5Pda From fc2ee9eb44b5aed0a3c582beb6cb4dfb54043ba4 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 11:27:47 +0100 Subject: [PATCH 26/31] continue fixing tests --- tests/bolt.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index f1715d1..fc64388 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -423,8 +423,8 @@ describe("bolt", () => { componentPositionEntity4Pda ); logPosition("Fly System: Entity 4", position); - expect(position.x.toNumber()).to.equal(1); - expect(position.y.toNumber()).to.equal(1); + expect(position.x.toNumber()).to.equal(0); + expect(position.y.toNumber()).to.equal(0); expect(position.z.toNumber()).to.equal(1); }); @@ -474,14 +474,14 @@ describe("bolt", () => { payer: provider.wallet.publicKey, data: componentPositionEntity5Pda, entity: entity5Pda, - //instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, - //systemProgram: anchor.web3.SystemProgram.programId, authority: provider.wallet.publicKey, }) .rpc(); } catch (error) { console.log("error.message", error.message); - // expect(error.message).to.contain("Invalid authority"); // TODO(vbrunet) - find correct error message + expect(error.message).to.contain( + "The instruction must be called from a CPI" + ); invalid = true; } expect(invalid).to.equal(true); @@ -490,22 +490,19 @@ describe("bolt", () => { // Check illegal call, without CPI it("Check invalid update without CPI", async () => { let invalid = false; - const componentVelocityEntity5 = FindComponentPda({ - componentId: exampleComponentVelocity.programId, - entity: entity5Pda, - }); try { await boltComponentProgram.methods - .update(null) + .update(Buffer.from("")) .accounts({ - boltComponent: componentVelocityEntity5, - //instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY, + boltComponent: componentPositionEntity5Pda, authority: provider.wallet.publicKey, }) .rpc(); } catch (error) { console.log("error.message", error.message); - // expect(error.message).to.contain("Invalid authority"); // TODO(vbrunet) - find correct error message + expect(error.message).to.contain( + "The instruction must be called from a CPI" + ); invalid = true; } expect(invalid).to.equal(true); From 0bd6c2654118498bb0e29462e948d62f52f6545c Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 11:40:37 +0100 Subject: [PATCH 27/31] fix-component-index-in-apply --- clients/bolt-sdk/src/world/transactions.ts | 7 ++++--- tests/bolt.ts | 8 ++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/clients/bolt-sdk/src/world/transactions.ts b/clients/bolt-sdk/src/world/transactions.ts index 045a966..62e4428 100644 --- a/clients/bolt-sdk/src/world/transactions.ts +++ b/clients/bolt-sdk/src/world/transactions.ts @@ -142,7 +142,6 @@ function getApplyInstructionFunctionName(componentsCount: number) { if (componentsCount === 1) return "createApplyInstruction"; return `createApply${componentsCount}Instruction`; } - function getBoltComponentName(index: number, componentsCount: number) { if (componentsCount === 1) return "boltComponent"; return `boltComponent${index + 1}`; @@ -178,6 +177,7 @@ function createApplySystemInstruction({ anchorRemainingAccounts: extraAccounts, }; + let componentIndex = 0; entities.forEach(function (entity) { entity.components.forEach(function (component) { const componentPda = FindComponentPda({ @@ -186,10 +186,11 @@ function createApplySystemInstruction({ seed: component.seed, }); instructionArgs[ - getBoltComponentProgramName(componentCount, componentCount) + getBoltComponentProgramName(componentIndex, componentCount) ] = component.componentId; - instructionArgs[getBoltComponentName(componentCount, componentCount)] = + instructionArgs[getBoltComponentName(componentIndex, componentCount)] = componentPda; + componentIndex++; }); }); diff --git a/tests/bolt.ts b/tests/bolt.ts index fc64388..9436c50 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -464,8 +464,7 @@ describe("bolt", () => { expect(positionBefore.z.toNumber()).to.equal(positionAfter.z.toNumber()); }); - // Check illegal call, without CPI - it("Check invalid init without CPI", async () => { + it("Check invalid component init without CPI", async () => { let invalid = false; try { await exampleComponentPosition.methods @@ -487,8 +486,7 @@ describe("bolt", () => { expect(invalid).to.equal(true); }); - // Check illegal call, without CPI - it("Check invalid update without CPI", async () => { + it("Check invalid component update without CPI", async () => { let invalid = false; try { await boltComponentProgram.methods @@ -508,7 +506,6 @@ describe("bolt", () => { expect(invalid).to.equal(true); }); - // Check component delegation it("Check component delegation", async () => { const delegateIx = createDelegateInstruction({ entity: entity1Pda, @@ -524,7 +521,6 @@ describe("bolt", () => { expect(acc.owner.toString()).to.equal(DELEGATION_PROGRAM_ID); }); - // Check component undelegation it("Check component undelegation", async () => { const delegateIx = createUndelegateInstruction({ payer: provider.wallet.publicKey, From 8806f6dcaf4301c31e77230893ac133dbac23409 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 11:45:57 +0100 Subject: [PATCH 28/31] get validator error message --- tests/bolt.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index 9436c50..c360482 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -447,7 +447,9 @@ describe("bolt", () => { let failed = false; try { - await provider.sendAndConfirm(applySystem.transaction); + await provider.sendAndConfirm(applySystem.transaction, [], { + skipPreflight: true, // Skip preflight to get error message from validator + }); } catch (error) { failed = true; console.log("error.message", error.message); From af2218363d8439b738cfa147a20d36c99b74ee33 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 12:13:00 +0100 Subject: [PATCH 29/31] once again checking the error messages --- tests/bolt.ts | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index c360482..aee1ef9 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -16,13 +16,11 @@ import { createUndelegateInstruction, createInitializeRegistryInstruction, DELEGATION_PROGRAM_ID, - FindComponentPda, FindRegistryPda, InitializeComponent, InitializeNewWorld, - SYSVAR_INSTRUCTIONS_PUBKEY, + ApplySystem, } from "../clients/bolt-sdk"; -import { ApplySystem } from "../clients/bolt-sdk/src"; enum Direction { Left = "Left", @@ -97,7 +95,6 @@ describe("bolt", () => { let componentPositionEntity1Pda: PublicKey; let componentVelocityEntity1Pda: PublicKey; - let componentPositionEntity2Pda: PublicKey; let componentPositionEntity4Pda: PublicKey; let componentPositionEntity5Pda: PublicKey; @@ -226,7 +223,6 @@ describe("bolt", () => { componentId: exampleComponentPosition.programId, }); await provider.sendAndConfirm(initializeComponent.transaction); - componentPositionEntity2Pda = initializeComponent.componentPda; // Saved for later }); it("Initialize Position Component on Entity 4", async () => { @@ -260,7 +256,7 @@ describe("bolt", () => { expect(position.z.toNumber()).to.equal(0); }); - it("Simple Movement System and Up direction on Entity 1", async () => { + it("Apply Simple Movement System (Up) on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, systemId: exampleSystemSimpleMovement, @@ -285,7 +281,7 @@ describe("bolt", () => { expect(position.z.toNumber()).to.equal(0); }); - it("Simple Movement System and Right direction on Entity 1", async () => { + it("Apply Simple Movement System (Right) on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, systemId: exampleSystemSimpleMovement, @@ -310,7 +306,7 @@ describe("bolt", () => { expect(position.z.toNumber()).to.equal(0); }); - it("Fly System on Entity 1", async () => { + it("Apply Fly System on Entity 1", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, systemId: exampleSystemFly, @@ -400,13 +396,13 @@ describe("bolt", () => { const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda ); - logPosition("Apply System Velocity: Position Entity 1", position); - expect(position.x.toNumber()).to.equal(1); + logPosition("Apply System Velocity: Entity 1", position); + expect(position.x.toNumber()).to.greaterThan(1); expect(position.y.toNumber()).to.equal(1); expect(position.z.toNumber()).to.equal(300); }); - it("Fly System on Entity 4", async () => { + it("Apply Fly System on Entity 4", async () => { const applySystem = await ApplySystem({ authority: provider.wallet.publicKey, systemId: exampleSystemFly, @@ -428,7 +424,7 @@ describe("bolt", () => { expect(position.z.toNumber()).to.equal(1); }); - it("Fly System on Entity 5 (should fail with wrong authority)", async () => { + it("Apply Fly System on Entity 5 (should fail with wrong authority)", async () => { const positionBefore = await exampleComponentPosition.account.position.fetch( componentPositionEntity5Pda @@ -447,11 +443,10 @@ describe("bolt", () => { let failed = false; try { - await provider.sendAndConfirm(applySystem.transaction, [], { - skipPreflight: true, // Skip preflight to get error message from validator - }); + await provider.sendAndConfirm(applySystem.transaction); } catch (error) { failed = true; + console.log("error", error); console.log("error.message", error.message); expect(error.message).to.contain("Invalid authority"); } @@ -480,9 +475,7 @@ describe("bolt", () => { .rpc(); } catch (error) { console.log("error.message", error.message); - expect(error.message).to.contain( - "The instruction must be called from a CPI" - ); + expect(error.message).to.contain("InvalidCaller"); invalid = true; } expect(invalid).to.equal(true); @@ -494,15 +487,13 @@ describe("bolt", () => { await boltComponentProgram.methods .update(Buffer.from("")) .accounts({ - boltComponent: componentPositionEntity5Pda, + boltComponent: componentPositionEntity4Pda, authority: provider.wallet.publicKey, }) .rpc(); } catch (error) { console.log("error.message", error.message); - expect(error.message).to.contain( - "The instruction must be called from a CPI" - ); + expect(error.message).to.contain("InvalidCaller"); invalid = true; } expect(invalid).to.equal(true); @@ -516,7 +507,7 @@ describe("bolt", () => { payer: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); - await provider.sendAndConfirm(tx, [], { skipPreflight: true }); + await provider.sendAndConfirm(tx); const acc = await provider.connection.getAccountInfo( componentPositionEntity1Pda ); @@ -531,7 +522,7 @@ describe("bolt", () => { reimbursement: provider.wallet.publicKey, }); const tx = new anchor.web3.Transaction().add(delegateIx); - await provider.sendAndConfirm(tx, [], { skipPreflight: true }); + await provider.sendAndConfirm(tx); const acc = await provider.connection.getAccountInfo( componentPositionEntity1Pda ); From dccd1b0f607b4c4f606ca218e40b0c403b112a23 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 12:43:05 +0100 Subject: [PATCH 30/31] update-expected-results --- tests/bolt.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index aee1ef9..d7542df 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -351,10 +351,10 @@ describe("bolt", () => { componentVelocityEntity1Pda ); logVelocity("Apply System Velocity: Entity 1", velocity); - expect(velocity.x.toNumber()).to.equal(0); + expect(velocity.x.toNumber()).to.equal(10); expect(velocity.y.toNumber()).to.equal(0); expect(velocity.z.toNumber()).to.equal(0); - expect(velocity.lastApplied.toNumber()).to.equal(0); + expect(velocity.lastApplied.toNumber()).to.not.equal(0); const position = await exampleComponentPosition.account.position.fetch( componentPositionEntity1Pda @@ -446,9 +446,7 @@ describe("bolt", () => { await provider.sendAndConfirm(applySystem.transaction); } catch (error) { failed = true; - console.log("error", error); - console.log("error.message", error.message); - expect(error.message).to.contain("Invalid authority"); + expect(error.logs.join("\n")).to.contain("Error Code: InvalidAuthority"); } expect(failed).to.equal(true); @@ -493,7 +491,9 @@ describe("bolt", () => { .rpc(); } catch (error) { console.log("error.message", error.message); - expect(error.message).to.contain("InvalidCaller"); + expect(error.message).to.contain( + "bolt_component. Error Code: AccountOwnedByWrongProgram" + ); invalid = true; } expect(invalid).to.equal(true); From d7935d80b5a19cb6db85631f118958800d47adc6 Mon Sep 17 00:00:00 2001 From: Vincent Brunet Date: Mon, 17 Jun 2024 13:06:06 +0100 Subject: [PATCH 31/31] everything should pass now --- tests/bolt.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index d7542df..497cd74 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -360,7 +360,7 @@ describe("bolt", () => { componentPositionEntity1Pda ); logPosition("Apply System Velocity: Entity 1", position); - expect(position.x.toNumber()).to.equal(1); + expect(position.x.toNumber()).to.greaterThan(1); expect(position.y.toNumber()).to.equal(1); expect(position.z.toNumber()).to.equal(1); }); @@ -446,6 +446,7 @@ describe("bolt", () => { await provider.sendAndConfirm(applySystem.transaction); } catch (error) { failed = true; + //console.log("error", error); expect(error.logs.join("\n")).to.contain("Error Code: InvalidAuthority"); } expect(failed).to.equal(true); @@ -472,8 +473,8 @@ describe("bolt", () => { }) .rpc(); } catch (error) { - console.log("error.message", error.message); - expect(error.message).to.contain("InvalidCaller"); + //console.log("error", error); + expect(error.message).to.contain("Error Code: InvalidCaller"); invalid = true; } expect(invalid).to.equal(true); @@ -490,7 +491,7 @@ describe("bolt", () => { }) .rpc(); } catch (error) { - console.log("error.message", error.message); + //console.log("error", error); expect(error.message).to.contain( "bolt_component. Error Code: AccountOwnedByWrongProgram" );