phygital-payment-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -0
- package/dist/arbiter/client.d.ts +34 -0
- package/dist/arbiter/client.d.ts.map +1 -0
- package/dist/arbiter/client.js +106 -0
- package/dist/arbiter/client.js.map +1 -0
- package/dist/core/amounts.d.ts +4 -0
- package/dist/core/amounts.d.ts.map +1 -0
- package/dist/core/amounts.js +36 -0
- package/dist/core/amounts.js.map +1 -0
- package/dist/core/bytes.d.ts +11 -0
- package/dist/core/bytes.d.ts.map +1 -0
- package/dist/core/bytes.js +69 -0
- package/dist/core/bytes.js.map +1 -0
- package/dist/core/challenge.d.ts +15 -0
- package/dist/core/challenge.d.ts.map +1 -0
- package/dist/core/challenge.js +24 -0
- package/dist/core/challenge.js.map +1 -0
- package/dist/core/errors.d.ts +90 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +204 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/events.d.ts +113 -0
- package/dist/core/events.d.ts.map +1 -0
- package/dist/core/events.js +258 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/evidence.d.ts +3 -0
- package/dist/core/evidence.d.ts.map +1 -0
- package/dist/core/evidence.js +7 -0
- package/dist/core/evidence.js.map +1 -0
- package/dist/core/execution-plan.d.ts +25 -0
- package/dist/core/execution-plan.d.ts.map +1 -0
- package/dist/core/execution-plan.js +57 -0
- package/dist/core/execution-plan.js.map +1 -0
- package/dist/core/indexer-store.d.ts +31 -0
- package/dist/core/indexer-store.d.ts.map +1 -0
- package/dist/core/indexer-store.js +2 -0
- package/dist/core/indexer-store.js.map +1 -0
- package/dist/core/instruction-codec.d.ts +13 -0
- package/dist/core/instruction-codec.d.ts.map +1 -0
- package/dist/core/instruction-codec.js +23 -0
- package/dist/core/instruction-codec.js.map +1 -0
- package/dist/core/payment.d.ts +116 -0
- package/dist/core/payment.d.ts.map +1 -0
- package/dist/core/payment.js +185 -0
- package/dist/core/payment.js.map +1 -0
- package/dist/core/pda.d.ts +29 -0
- package/dist/core/pda.d.ts.map +1 -0
- package/dist/core/pda.js +48 -0
- package/dist/core/pda.js.map +1 -0
- package/dist/core/provider-fee-payer.d.ts +5 -0
- package/dist/core/provider-fee-payer.d.ts.map +1 -0
- package/dist/core/provider-fee-payer.js +17 -0
- package/dist/core/provider-fee-payer.js.map +1 -0
- package/dist/core/provider-transport.d.ts +79 -0
- package/dist/core/provider-transport.d.ts.map +1 -0
- package/dist/core/provider-transport.js +151 -0
- package/dist/core/provider-transport.js.map +1 -0
- package/dist/core/status.d.ts +13 -0
- package/dist/core/status.d.ts.map +1 -0
- package/dist/core/status.js +17 -0
- package/dist/core/status.js.map +1 -0
- package/dist/core/time.d.ts +29 -0
- package/dist/core/time.d.ts.map +1 -0
- package/dist/core/time.js +66 -0
- package/dist/core/time.js.map +1 -0
- package/dist/core/transactions.d.ts +16 -0
- package/dist/core/transactions.d.ts.map +1 -0
- package/dist/core/transactions.js +87 -0
- package/dist/core/transactions.js.map +1 -0
- package/dist/generated/accounts/arbiter.d.ts +31 -0
- package/dist/generated/accounts/arbiter.d.ts.map +1 -0
- package/dist/generated/accounts/arbiter.js +57 -0
- package/dist/generated/accounts/arbiter.js.map +1 -0
- package/dist/generated/accounts/index.d.ts +5 -0
- package/dist/generated/accounts/index.d.ts.map +1 -0
- package/dist/generated/accounts/index.js +5 -0
- package/dist/generated/accounts/index.js.map +1 -0
- package/dist/generated/accounts/merchantOperator.d.ts +25 -0
- package/dist/generated/accounts/merchantOperator.d.ts.map +1 -0
- package/dist/generated/accounts/merchantOperator.js +49 -0
- package/dist/generated/accounts/merchantOperator.js.map +1 -0
- package/dist/generated/accounts/payment.d.ts +56 -0
- package/dist/generated/accounts/payment.d.ts.map +1 -0
- package/dist/generated/accounts/payment.js +82 -0
- package/dist/generated/accounts/payment.js.map +1 -0
- package/dist/generated/accounts/paymentAccount.d.ts +59 -0
- package/dist/generated/accounts/paymentAccount.d.ts.map +1 -0
- package/dist/generated/accounts/paymentAccount.js +83 -0
- package/dist/generated/accounts/paymentAccount.js.map +1 -0
- package/dist/generated/errors/index.d.ts +2 -0
- package/dist/generated/errors/index.d.ts.map +1 -0
- package/dist/generated/errors/index.js +2 -0
- package/dist/generated/errors/index.js.map +1 -0
- package/dist/generated/errors/phygitalPayment.d.ts +50 -0
- package/dist/generated/errors/phygitalPayment.d.ts.map +1 -0
- package/dist/generated/errors/phygitalPayment.js +91 -0
- package/dist/generated/errors/phygitalPayment.js.map +1 -0
- package/dist/generated/index.d.ts +7 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +7 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/instructions/addMerchantOperator.d.ts +49 -0
- package/dist/generated/instructions/addMerchantOperator.d.ts.map +1 -0
- package/dist/generated/instructions/addMerchantOperator.js +110 -0
- package/dist/generated/instructions/addMerchantOperator.js.map +1 -0
- package/dist/generated/instructions/autoRefund.d.ts +48 -0
- package/dist/generated/instructions/autoRefund.d.ts.map +1 -0
- package/dist/generated/instructions/autoRefund.js +91 -0
- package/dist/generated/instructions/autoRefund.js.map +1 -0
- package/dist/generated/instructions/autoSettle.d.ts +45 -0
- package/dist/generated/instructions/autoSettle.d.ts.map +1 -0
- package/dist/generated/instructions/autoSettle.js +82 -0
- package/dist/generated/instructions/autoSettle.js.map +1 -0
- package/dist/generated/instructions/closeExpiredPayment.d.ts +36 -0
- package/dist/generated/instructions/closeExpiredPayment.d.ts.map +1 -0
- package/dist/generated/instructions/closeExpiredPayment.js +64 -0
- package/dist/generated/instructions/closeExpiredPayment.js.map +1 -0
- package/dist/generated/instructions/dispute.d.ts +49 -0
- package/dist/generated/instructions/dispute.d.ts.map +1 -0
- package/dist/generated/instructions/dispute.js +84 -0
- package/dist/generated/instructions/dispute.js.map +1 -0
- package/dist/generated/instructions/disputeAuthorization.d.ts +73 -0
- package/dist/generated/instructions/disputeAuthorization.d.ts.map +1 -0
- package/dist/generated/instructions/disputeAuthorization.js +149 -0
- package/dist/generated/instructions/disputeAuthorization.js.map +1 -0
- package/dist/generated/instructions/index.d.ts +21 -0
- package/dist/generated/instructions/index.d.ts.map +1 -0
- package/dist/generated/instructions/index.js +21 -0
- package/dist/generated/instructions/index.js.map +1 -0
- package/dist/generated/instructions/merchantRefund.d.ts +43 -0
- package/dist/generated/instructions/merchantRefund.d.ts.map +1 -0
- package/dist/generated/instructions/merchantRefund.js +78 -0
- package/dist/generated/instructions/merchantRefund.js.map +1 -0
- package/dist/generated/instructions/merchantRespond.d.ts +43 -0
- package/dist/generated/instructions/merchantRespond.d.ts.map +1 -0
- package/dist/generated/instructions/merchantRespond.js +78 -0
- package/dist/generated/instructions/merchantRespond.js.map +1 -0
- package/dist/generated/instructions/refundSettled.d.ts +52 -0
- package/dist/generated/instructions/refundSettled.d.ts.map +1 -0
- package/dist/generated/instructions/refundSettled.js +88 -0
- package/dist/generated/instructions/refundSettled.js.map +1 -0
- package/dist/generated/instructions/registerArbiter.d.ts +44 -0
- package/dist/generated/instructions/registerArbiter.d.ts.map +1 -0
- package/dist/generated/instructions/registerArbiter.js +94 -0
- package/dist/generated/instructions/registerArbiter.js.map +1 -0
- package/dist/generated/instructions/removeMerchantOperator.d.ts +45 -0
- package/dist/generated/instructions/removeMerchantOperator.d.ts.map +1 -0
- package/dist/generated/instructions/removeMerchantOperator.js +97 -0
- package/dist/generated/instructions/removeMerchantOperator.js.map +1 -0
- package/dist/generated/instructions/resolveDispute.d.ts +55 -0
- package/dist/generated/instructions/resolveDispute.d.ts.map +1 -0
- package/dist/generated/instructions/resolveDispute.js +91 -0
- package/dist/generated/instructions/resolveDispute.js.map +1 -0
- package/dist/generated/instructions/setApprovedArbiter.d.ts +57 -0
- package/dist/generated/instructions/setApprovedArbiter.d.ts.map +1 -0
- package/dist/generated/instructions/setApprovedArbiter.js +121 -0
- package/dist/generated/instructions/setApprovedArbiter.js.map +1 -0
- package/dist/generated/instructions/setAuthorizedCredential.d.ts +64 -0
- package/dist/generated/instructions/setAuthorizedCredential.d.ts.map +1 -0
- package/dist/generated/instructions/setAuthorizedCredential.js +138 -0
- package/dist/generated/instructions/setAuthorizedCredential.js.map +1 -0
- package/dist/generated/instructions/setPaymentEnabler.d.ts +65 -0
- package/dist/generated/instructions/setPaymentEnabler.d.ts.map +1 -0
- package/dist/generated/instructions/setPaymentEnabler.js +136 -0
- package/dist/generated/instructions/setPaymentEnabler.js.map +1 -0
- package/dist/generated/instructions/setReserve.d.ts +53 -0
- package/dist/generated/instructions/setReserve.d.ts.map +1 -0
- package/dist/generated/instructions/setReserve.js +109 -0
- package/dist/generated/instructions/setReserve.js.map +1 -0
- package/dist/generated/instructions/setTapLimit.d.ts +53 -0
- package/dist/generated/instructions/setTapLimit.d.ts.map +1 -0
- package/dist/generated/instructions/setTapLimit.js +109 -0
- package/dist/generated/instructions/setTapLimit.js.map +1 -0
- package/dist/generated/instructions/transfer.d.ts +97 -0
- package/dist/generated/instructions/transfer.d.ts.map +1 -0
- package/dist/generated/instructions/transfer.js +182 -0
- package/dist/generated/instructions/transfer.js.map +1 -0
- package/dist/generated/instructions/withdrawDispute.d.ts +36 -0
- package/dist/generated/instructions/withdrawDispute.d.ts.map +1 -0
- package/dist/generated/instructions/withdrawDispute.js +61 -0
- package/dist/generated/instructions/withdrawDispute.js.map +1 -0
- package/dist/generated/instructions/withdrawFromEscrow.d.ts +61 -0
- package/dist/generated/instructions/withdrawFromEscrow.d.ts.map +1 -0
- package/dist/generated/instructions/withdrawFromEscrow.js +132 -0
- package/dist/generated/instructions/withdrawFromEscrow.js.map +1 -0
- package/dist/generated/pdas/arbiterAccount.d.ts +8 -0
- package/dist/generated/pdas/arbiterAccount.d.ts.map +1 -0
- package/dist/generated/pdas/arbiterAccount.js +12 -0
- package/dist/generated/pdas/arbiterAccount.js.map +1 -0
- package/dist/generated/pdas/index.d.ts +6 -0
- package/dist/generated/pdas/index.d.ts.map +1 -0
- package/dist/generated/pdas/index.js +6 -0
- package/dist/generated/pdas/index.js.map +1 -0
- package/dist/generated/pdas/merchantOperator.d.ts +9 -0
- package/dist/generated/pdas/merchantOperator.d.ts.map +1 -0
- package/dist/generated/pdas/merchantOperator.js +16 -0
- package/dist/generated/pdas/merchantOperator.js.map +1 -0
- package/dist/generated/pdas/payment.d.ts +9 -0
- package/dist/generated/pdas/payment.d.ts.map +1 -0
- package/dist/generated/pdas/payment.js +13 -0
- package/dist/generated/pdas/payment.js.map +1 -0
- package/dist/generated/pdas/paymentAccount.d.ts +10 -0
- package/dist/generated/pdas/paymentAccount.d.ts.map +1 -0
- package/dist/generated/pdas/paymentAccount.js +16 -0
- package/dist/generated/pdas/paymentAccount.js.map +1 -0
- package/dist/generated/pdas/setApprovedArbiterArbiterAccount.d.ts +8 -0
- package/dist/generated/pdas/setApprovedArbiterArbiterAccount.d.ts.map +1 -0
- package/dist/generated/pdas/setApprovedArbiterArbiterAccount.js +12 -0
- package/dist/generated/pdas/setApprovedArbiterArbiterAccount.js.map +1 -0
- package/dist/generated/programs/index.d.ts +2 -0
- package/dist/generated/programs/index.d.ts.map +1 -0
- package/dist/generated/programs/index.js +2 -0
- package/dist/generated/programs/index.js.map +1 -0
- package/dist/generated/programs/phygitalPayment.d.ts +132 -0
- package/dist/generated/programs/phygitalPayment.d.ts.map +1 -0
- package/dist/generated/programs/phygitalPayment.js +322 -0
- package/dist/generated/programs/phygitalPayment.js.map +1 -0
- package/dist/generated/types/index.d.ts +2 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +2 -0
- package/dist/generated/types/index.js.map +1 -0
- package/dist/generated/types/paymentFlags.d.ts +7 -0
- package/dist/generated/types/paymentFlags.d.ts.map +1 -0
- package/dist/generated/types/paymentFlags.js +11 -0
- package/dist/generated/types/paymentFlags.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/merchant/charge.d.ts +106 -0
- package/dist/merchant/charge.d.ts.map +1 -0
- package/dist/merchant/charge.js +311 -0
- package/dist/merchant/charge.js.map +1 -0
- package/dist/merchant/client.d.ts +80 -0
- package/dist/merchant/client.d.ts.map +1 -0
- package/dist/merchant/client.js +282 -0
- package/dist/merchant/client.js.map +1 -0
- package/dist/merchant/deferred-queue.d.ts +35 -0
- package/dist/merchant/deferred-queue.d.ts.map +1 -0
- package/dist/merchant/deferred-queue.js +237 -0
- package/dist/merchant/deferred-queue.js.map +1 -0
- package/dist/merchant/deferred-store.d.ts +67 -0
- package/dist/merchant/deferred-store.d.ts.map +1 -0
- package/dist/merchant/deferred-store.js +126 -0
- package/dist/merchant/deferred-store.js.map +1 -0
- package/dist/merchant/indexed-db-store.d.ts +6 -0
- package/dist/merchant/indexed-db-store.d.ts.map +1 -0
- package/dist/merchant/indexed-db-store.js +121 -0
- package/dist/merchant/indexed-db-store.js.map +1 -0
- package/dist/merchant/tap.d.ts +11 -0
- package/dist/merchant/tap.d.ts.map +1 -0
- package/dist/merchant/tap.js +47 -0
- package/dist/merchant/tap.js.map +1 -0
- package/dist/server/closable-store.d.ts +12 -0
- package/dist/server/closable-store.d.ts.map +1 -0
- package/dist/server/closable-store.js +16 -0
- package/dist/server/closable-store.js.map +1 -0
- package/dist/server/deferred-flusher.d.ts +19 -0
- package/dist/server/deferred-flusher.d.ts.map +1 -0
- package/dist/server/deferred-flusher.js +57 -0
- package/dist/server/deferred-flusher.js.map +1 -0
- package/dist/server/enabler-service.d.ts +20 -0
- package/dist/server/enabler-service.d.ts.map +1 -0
- package/dist/server/enabler-service.js +191 -0
- package/dist/server/enabler-service.js.map +1 -0
- package/dist/server/enabler-signer.d.ts +11 -0
- package/dist/server/enabler-signer.d.ts.map +1 -0
- package/dist/server/enabler-signer.js +37 -0
- package/dist/server/enabler-signer.js.map +1 -0
- package/dist/server/fee-budget.d.ts +22 -0
- package/dist/server/fee-budget.d.ts.map +1 -0
- package/dist/server/fee-budget.js +58 -0
- package/dist/server/fee-budget.js.map +1 -0
- package/dist/server/fee-payer.d.ts +27 -0
- package/dist/server/fee-payer.d.ts.map +1 -0
- package/dist/server/fee-payer.js +167 -0
- package/dist/server/fee-payer.js.map +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +14 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/indexer.d.ts +50 -0
- package/dist/server/indexer.d.ts.map +1 -0
- package/dist/server/indexer.js +218 -0
- package/dist/server/indexer.js.map +1 -0
- package/dist/server/keeper.d.ts +34 -0
- package/dist/server/keeper.d.ts.map +1 -0
- package/dist/server/keeper.js +246 -0
- package/dist/server/keeper.js.map +1 -0
- package/dist/server/pending-taps.d.ts +12 -0
- package/dist/server/pending-taps.d.ts.map +1 -0
- package/dist/server/pending-taps.js +19 -0
- package/dist/server/pending-taps.js.map +1 -0
- package/dist/server/policy.d.ts +46 -0
- package/dist/server/policy.d.ts.map +1 -0
- package/dist/server/policy.js +47 -0
- package/dist/server/policy.js.map +1 -0
- package/dist/server/provider-deferred-queue.d.ts +21 -0
- package/dist/server/provider-deferred-queue.d.ts.map +1 -0
- package/dist/server/provider-deferred-queue.js +69 -0
- package/dist/server/provider-deferred-queue.js.map +1 -0
- package/dist/server/queue.d.ts +43 -0
- package/dist/server/queue.d.ts.map +1 -0
- package/dist/server/queue.js +105 -0
- package/dist/server/queue.js.map +1 -0
- package/dist/server/router.d.ts +21 -0
- package/dist/server/router.d.ts.map +1 -0
- package/dist/server/router.js +137 -0
- package/dist/server/router.js.map +1 -0
- package/dist/server/webauthn.d.ts +2 -0
- package/dist/server/webauthn.d.ts.map +1 -0
- package/dist/server/webauthn.js +19 -0
- package/dist/server/webauthn.js.map +1 -0
- package/dist/wallet/client.d.ts +106 -0
- package/dist/wallet/client.d.ts.map +1 -0
- package/dist/wallet/client.js +354 -0
- package/dist/wallet/client.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
2
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
3
|
+
export declare const RESOLVE_DISPUTE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
4
|
+
export declare function getResolveDisputeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
5
|
+
export type ResolveDisputeInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountArbiter extends string | AccountMeta<string> = string, TAccountPaymentAccount extends string | AccountMeta<string> = string, TAccountPayment extends string | AccountMeta<string> = string, TAccountArbiterAccount extends string | AccountMeta<string> = string, TAccountEscrowTokenAccount extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountMerchantTokenAccount extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
6
|
+
TAccountArbiter extends string ? ReadonlySignerAccount<TAccountArbiter> & AccountSignerMeta<TAccountArbiter> : TAccountArbiter,
|
|
7
|
+
TAccountPaymentAccount extends string ? WritableAccount<TAccountPaymentAccount> : TAccountPaymentAccount,
|
|
8
|
+
TAccountPayment extends string ? WritableAccount<TAccountPayment> : TAccountPayment,
|
|
9
|
+
TAccountArbiterAccount extends string ? WritableAccount<TAccountArbiterAccount> : TAccountArbiterAccount,
|
|
10
|
+
TAccountEscrowTokenAccount extends string ? WritableAccount<TAccountEscrowTokenAccount> : TAccountEscrowTokenAccount,
|
|
11
|
+
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
|
|
12
|
+
TAccountMerchantTokenAccount extends string ? WritableAccount<TAccountMerchantTokenAccount> : TAccountMerchantTokenAccount,
|
|
13
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
14
|
+
...TRemainingAccounts
|
|
15
|
+
]>;
|
|
16
|
+
export type ResolveDisputeInstructionData = {
|
|
17
|
+
discriminator: ReadonlyUint8Array;
|
|
18
|
+
merchantAmount: bigint;
|
|
19
|
+
};
|
|
20
|
+
export type ResolveDisputeInstructionDataArgs = {
|
|
21
|
+
merchantAmount: number | bigint;
|
|
22
|
+
};
|
|
23
|
+
export declare function getResolveDisputeInstructionDataEncoder(): FixedSizeEncoder<ResolveDisputeInstructionDataArgs>;
|
|
24
|
+
export declare function getResolveDisputeInstructionDataDecoder(): FixedSizeDecoder<ResolveDisputeInstructionData>;
|
|
25
|
+
export declare function getResolveDisputeInstructionDataCodec(): FixedSizeCodec<ResolveDisputeInstructionDataArgs, ResolveDisputeInstructionData>;
|
|
26
|
+
export type ResolveDisputeInput<TAccountArbiter extends string = string, TAccountPaymentAccount extends string = string, TAccountPayment extends string = string, TAccountArbiterAccount extends string = string, TAccountEscrowTokenAccount extends string = string, TAccountMint extends string = string, TAccountMerchantTokenAccount extends string = string, TAccountTokenProgram extends string = string> = {
|
|
27
|
+
arbiter: TransactionSigner<TAccountArbiter>;
|
|
28
|
+
paymentAccount: Address<TAccountPaymentAccount>;
|
|
29
|
+
payment: Address<TAccountPayment>;
|
|
30
|
+
arbiterAccount: Address<TAccountArbiterAccount>;
|
|
31
|
+
escrowTokenAccount: Address<TAccountEscrowTokenAccount>;
|
|
32
|
+
mint: Address<TAccountMint>;
|
|
33
|
+
merchantTokenAccount: Address<TAccountMerchantTokenAccount>;
|
|
34
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
35
|
+
merchantAmount: ResolveDisputeInstructionDataArgs["merchantAmount"];
|
|
36
|
+
};
|
|
37
|
+
export declare function getResolveDisputeInstruction<TAccountArbiter extends string, TAccountPaymentAccount extends string, TAccountPayment extends string, TAccountArbiterAccount extends string, TAccountEscrowTokenAccount extends string, TAccountMint extends string, TAccountMerchantTokenAccount extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS>(input: ResolveDisputeInput<TAccountArbiter, TAccountPaymentAccount, TAccountPayment, TAccountArbiterAccount, TAccountEscrowTokenAccount, TAccountMint, TAccountMerchantTokenAccount, TAccountTokenProgram>, config?: {
|
|
38
|
+
programAddress?: TProgramAddress;
|
|
39
|
+
}): ResolveDisputeInstruction<TProgramAddress, TAccountArbiter, TAccountPaymentAccount, TAccountPayment, TAccountArbiterAccount, TAccountEscrowTokenAccount, TAccountMint, TAccountMerchantTokenAccount, TAccountTokenProgram>;
|
|
40
|
+
export type ParsedResolveDisputeInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
41
|
+
programAddress: Address<TProgram>;
|
|
42
|
+
accounts: {
|
|
43
|
+
arbiter: TAccountMetas[0];
|
|
44
|
+
paymentAccount: TAccountMetas[1];
|
|
45
|
+
payment: TAccountMetas[2];
|
|
46
|
+
arbiterAccount: TAccountMetas[3];
|
|
47
|
+
escrowTokenAccount: TAccountMetas[4];
|
|
48
|
+
mint: TAccountMetas[5];
|
|
49
|
+
merchantTokenAccount: TAccountMetas[6];
|
|
50
|
+
tokenProgram: TAccountMetas[7];
|
|
51
|
+
};
|
|
52
|
+
data: ResolveDisputeInstructionData;
|
|
53
|
+
};
|
|
54
|
+
export declare function parseResolveDisputeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedResolveDisputeInstruction<TProgram, TAccountMetas>;
|
|
55
|
+
//# sourceMappingURL=resolveDispute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveDispute.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/resolveDispute.ts"],"names":[],"mappings":"AAQA,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAExE,eAAO,MAAM,6BAA6B,EAAE,kBAE3C,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,kBAAkB,CAIxE;AAED,MAAM,MAAM,yBAAyB,CACnC,QAAQ,SAAS,MAAM,GAAG,OAAO,gCAAgC,EACjE,eAAe,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC7D,sBAAsB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EACpE,eAAe,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC7D,sBAAsB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EACpE,0BAA0B,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EACxE,YAAY,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC1D,4BAA4B,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC1E,oBAAoB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACvD,6CAA6C,EAC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_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
2
|
+
import { getAccountMetaFactory, } from "@solana/program-client-core";
|
|
3
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
4
|
+
export const RESOLVE_DISPUTE_DISCRIMINATOR = new Uint8Array([231, 6, 202, 6, 96, 103, 12, 230]);
|
|
5
|
+
export function getResolveDisputeDiscriminatorBytes() {
|
|
6
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(RESOLVE_DISPUTE_DISCRIMINATOR);
|
|
7
|
+
}
|
|
8
|
+
export function getResolveDisputeInstructionDataEncoder() {
|
|
9
|
+
return transformEncoder(getStructEncoder([
|
|
10
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
11
|
+
["merchantAmount", getU64Encoder()],
|
|
12
|
+
]), (value) => ({ ...value, discriminator: RESOLVE_DISPUTE_DISCRIMINATOR }));
|
|
13
|
+
}
|
|
14
|
+
export function getResolveDisputeInstructionDataDecoder() {
|
|
15
|
+
return getStructDecoder([
|
|
16
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
17
|
+
["merchantAmount", getU64Decoder()],
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
export function getResolveDisputeInstructionDataCodec() {
|
|
21
|
+
return combineCodec(getResolveDisputeInstructionDataEncoder(), getResolveDisputeInstructionDataDecoder());
|
|
22
|
+
}
|
|
23
|
+
export function getResolveDisputeInstruction(input, config) {
|
|
24
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
25
|
+
const originalAccounts = {
|
|
26
|
+
arbiter: { value: input.arbiter ?? null, isWritable: false },
|
|
27
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: true },
|
|
28
|
+
payment: { value: input.payment ?? null, isWritable: true },
|
|
29
|
+
arbiterAccount: { value: input.arbiterAccount ?? null, isWritable: true },
|
|
30
|
+
escrowTokenAccount: {
|
|
31
|
+
value: input.escrowTokenAccount ?? null,
|
|
32
|
+
isWritable: true,
|
|
33
|
+
},
|
|
34
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
35
|
+
merchantTokenAccount: {
|
|
36
|
+
value: input.merchantTokenAccount ?? null,
|
|
37
|
+
isWritable: true,
|
|
38
|
+
},
|
|
39
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
40
|
+
};
|
|
41
|
+
const accounts = originalAccounts;
|
|
42
|
+
const args = { ...input };
|
|
43
|
+
if (!accounts.tokenProgram.value) {
|
|
44
|
+
accounts.tokenProgram.value =
|
|
45
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
46
|
+
}
|
|
47
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
48
|
+
return Object.freeze({
|
|
49
|
+
accounts: [
|
|
50
|
+
getAccountMeta("arbiter", accounts.arbiter),
|
|
51
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
52
|
+
getAccountMeta("payment", accounts.payment),
|
|
53
|
+
getAccountMeta("arbiterAccount", accounts.arbiterAccount),
|
|
54
|
+
getAccountMeta("escrowTokenAccount", accounts.escrowTokenAccount),
|
|
55
|
+
getAccountMeta("mint", accounts.mint),
|
|
56
|
+
getAccountMeta("merchantTokenAccount", accounts.merchantTokenAccount),
|
|
57
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
58
|
+
],
|
|
59
|
+
data: getResolveDisputeInstructionDataEncoder().encode(args),
|
|
60
|
+
programAddress,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export function parseResolveDisputeInstruction(instruction) {
|
|
64
|
+
if (instruction.accounts.length < 8) {
|
|
65
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
66
|
+
actualAccountMetas: instruction.accounts.length,
|
|
67
|
+
expectedAccountMetas: 8,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
let accountIndex = 0;
|
|
71
|
+
const getNextAccount = () => {
|
|
72
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
73
|
+
accountIndex += 1;
|
|
74
|
+
return accountMeta;
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
programAddress: instruction.programAddress,
|
|
78
|
+
accounts: {
|
|
79
|
+
arbiter: getNextAccount(),
|
|
80
|
+
paymentAccount: getNextAccount(),
|
|
81
|
+
payment: getNextAccount(),
|
|
82
|
+
arbiterAccount: getNextAccount(),
|
|
83
|
+
escrowTokenAccount: getNextAccount(),
|
|
84
|
+
mint: getNextAccount(),
|
|
85
|
+
merchantTokenAccount: getNextAccount(),
|
|
86
|
+
tokenProgram: getNextAccount(),
|
|
87
|
+
},
|
|
88
|
+
data: getResolveDisputeInstructionDataDecoder().decode(instruction.data),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=resolveDispute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveDispute.js","sourceRoot":"","sources":["../../../src/generated/instructions/resolveDispute.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,GAEtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,CAAC,MAAM,6BAA6B,GAAuB,IAAI,UAAU,CAC7E,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CACnC,CAAC;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AAc,EAAE,QAAQ,CAAC,YAAY,CAAC;SACtD;QACD,IAAI,EAAE,uCAAuC,EAAE,CAAC,MAAM,CACpD,IAAyC,CAC1C;QACD,cAAc;KAWf,CAAC,CAAC;AACL,CAAC;AAwBD,MAAM,UAAU,8BAA8B,CAI5C,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,WAAW,CACnB,yDAAyD,EACzD;YACE,kBAAkB,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM;YAC/C,oBAAoB,EAAE,CAAC;SACxB,CACF,CAAC;IACJ,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAI,WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,OAAO,EAAE,cAAc,EAAE;YACzB,cAAc,EAAE,cAAc,EAAE;YAChC,OAAO,EAAE,cAAc,EAAE;YACzB,cAAc,EAAE,cAAc,EAAE;YAChC,kBAAkB,EAAE,cAAc,EAAE;YACpC,IAAI,EAAE,cAAc,EAAE;YACtB,oBAAoB,EAAE,cAAc,EAAE;YACtC,YAAY,EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,uCAAuC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACzE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
2
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
3
|
+
export declare const SET_APPROVED_ARBITER_DISCRIMINATOR: ReadonlyUint8Array;
|
|
4
|
+
export declare function getSetApprovedArbiterDiscriminatorBytes(): ReadonlyUint8Array;
|
|
5
|
+
export type SetApprovedArbiterInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPaymentAccount extends string | AccountMeta<string> = string, TAccountArbiterAccount extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
6
|
+
TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
7
|
+
TAccountPaymentAccount extends string ? WritableAccount<TAccountPaymentAccount> : TAccountPaymentAccount,
|
|
8
|
+
TAccountArbiterAccount extends string ? ReadonlyAccount<TAccountArbiterAccount> : TAccountArbiterAccount,
|
|
9
|
+
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
|
|
10
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
11
|
+
...TRemainingAccounts
|
|
12
|
+
]>;
|
|
13
|
+
export type SetApprovedArbiterInstructionData = {
|
|
14
|
+
discriminator: ReadonlyUint8Array;
|
|
15
|
+
arbiter: Address;
|
|
16
|
+
};
|
|
17
|
+
export type SetApprovedArbiterInstructionDataArgs = {
|
|
18
|
+
arbiter: Address;
|
|
19
|
+
};
|
|
20
|
+
export declare function getSetApprovedArbiterInstructionDataEncoder(): FixedSizeEncoder<SetApprovedArbiterInstructionDataArgs>;
|
|
21
|
+
export declare function getSetApprovedArbiterInstructionDataDecoder(): FixedSizeDecoder<SetApprovedArbiterInstructionData>;
|
|
22
|
+
export declare function getSetApprovedArbiterInstructionDataCodec(): FixedSizeCodec<SetApprovedArbiterInstructionDataArgs, SetApprovedArbiterInstructionData>;
|
|
23
|
+
export type SetApprovedArbiterAsyncInput<TAccountOwner extends string = string, TAccountPaymentAccount extends string = string, TAccountArbiterAccount extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string> = {
|
|
24
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
25
|
+
paymentAccount?: Address<TAccountPaymentAccount>;
|
|
26
|
+
arbiterAccount?: Address<TAccountArbiterAccount>;
|
|
27
|
+
mint: Address<TAccountMint>;
|
|
28
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
29
|
+
arbiter: SetApprovedArbiterInstructionDataArgs["arbiter"];
|
|
30
|
+
};
|
|
31
|
+
export declare function getSetApprovedArbiterInstructionAsync<TAccountOwner extends string, TAccountPaymentAccount extends string, TAccountArbiterAccount extends string, TAccountMint extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS>(input: SetApprovedArbiterAsyncInput<TAccountOwner, TAccountPaymentAccount, TAccountArbiterAccount, TAccountMint, TAccountTokenProgram>, config?: {
|
|
32
|
+
programAddress?: TProgramAddress;
|
|
33
|
+
}): Promise<SetApprovedArbiterInstruction<TProgramAddress, TAccountOwner, TAccountPaymentAccount, TAccountArbiterAccount, TAccountMint, TAccountTokenProgram>>;
|
|
34
|
+
export type SetApprovedArbiterInput<TAccountOwner extends string = string, TAccountPaymentAccount extends string = string, TAccountArbiterAccount extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string> = {
|
|
35
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
36
|
+
paymentAccount: Address<TAccountPaymentAccount>;
|
|
37
|
+
arbiterAccount: Address<TAccountArbiterAccount>;
|
|
38
|
+
mint: Address<TAccountMint>;
|
|
39
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
40
|
+
arbiter: SetApprovedArbiterInstructionDataArgs["arbiter"];
|
|
41
|
+
};
|
|
42
|
+
export declare function getSetApprovedArbiterInstruction<TAccountOwner extends string, TAccountPaymentAccount extends string, TAccountArbiterAccount extends string, TAccountMint extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS>(input: SetApprovedArbiterInput<TAccountOwner, TAccountPaymentAccount, TAccountArbiterAccount, TAccountMint, TAccountTokenProgram>, config?: {
|
|
43
|
+
programAddress?: TProgramAddress;
|
|
44
|
+
}): SetApprovedArbiterInstruction<TProgramAddress, TAccountOwner, TAccountPaymentAccount, TAccountArbiterAccount, TAccountMint, TAccountTokenProgram>;
|
|
45
|
+
export type ParsedSetApprovedArbiterInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
46
|
+
programAddress: Address<TProgram>;
|
|
47
|
+
accounts: {
|
|
48
|
+
owner: TAccountMetas[0];
|
|
49
|
+
paymentAccount: TAccountMetas[1];
|
|
50
|
+
arbiterAccount: TAccountMetas[2];
|
|
51
|
+
mint: TAccountMetas[3];
|
|
52
|
+
tokenProgram: TAccountMetas[4];
|
|
53
|
+
};
|
|
54
|
+
data: SetApprovedArbiterInstructionData;
|
|
55
|
+
};
|
|
56
|
+
export declare function parseSetApprovedArbiterInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetApprovedArbiterInstruction<TProgram, TAccountMetas>;
|
|
57
|
+
//# sourceMappingURL=setApprovedArbiter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setApprovedArbiter.d.ts","sourceRoot":"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E,uBAAuB,CAC5B,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,CACrB,EACD,MAAM,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,eAAe,CAAA;CAAE,GAC5C,6BAA6B,CAC9B,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,CACrB,CAgDA;AAED,MAAM,MAAM,mCAAmC,CAC7C,QAAQ,SAAS,MAAM,GAAG,OAAO,gCAAgC,EACjE,aAAa,SAAS,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE,IACnE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAKjC,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAChC,CAAC;IACF,IAAI,EAAE,iCAAiC,CAAC;CACzC,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,mCAAmC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA6B9D"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
2
|
+
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, getNonNullResolvedInstructionInput, } from "@solana/program-client-core";
|
|
3
|
+
import { findPaymentAccountPda, findSetApprovedArbiterArbiterAccountPda, } from "../pdas/index.js";
|
|
4
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
5
|
+
export const SET_APPROVED_ARBITER_DISCRIMINATOR = new Uint8Array([254, 219, 155, 117, 17, 95, 219, 173]);
|
|
6
|
+
export function getSetApprovedArbiterDiscriminatorBytes() {
|
|
7
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(SET_APPROVED_ARBITER_DISCRIMINATOR);
|
|
8
|
+
}
|
|
9
|
+
export function getSetApprovedArbiterInstructionDataEncoder() {
|
|
10
|
+
return transformEncoder(getStructEncoder([
|
|
11
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
12
|
+
["arbiter", getAddressEncoder()],
|
|
13
|
+
]), (value) => ({
|
|
14
|
+
...value,
|
|
15
|
+
discriminator: SET_APPROVED_ARBITER_DISCRIMINATOR,
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
export function getSetApprovedArbiterInstructionDataDecoder() {
|
|
19
|
+
return getStructDecoder([
|
|
20
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
21
|
+
["arbiter", getAddressDecoder()],
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
export function getSetApprovedArbiterInstructionDataCodec() {
|
|
25
|
+
return combineCodec(getSetApprovedArbiterInstructionDataEncoder(), getSetApprovedArbiterInstructionDataDecoder());
|
|
26
|
+
}
|
|
27
|
+
export async function getSetApprovedArbiterInstructionAsync(input, config) {
|
|
28
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
29
|
+
const originalAccounts = {
|
|
30
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
31
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: true },
|
|
32
|
+
arbiterAccount: { value: input.arbiterAccount ?? null, isWritable: false },
|
|
33
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
34
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
35
|
+
};
|
|
36
|
+
const accounts = originalAccounts;
|
|
37
|
+
const args = { ...input };
|
|
38
|
+
if (!accounts.tokenProgram.value) {
|
|
39
|
+
accounts.tokenProgram.value =
|
|
40
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
41
|
+
}
|
|
42
|
+
if (!accounts.paymentAccount.value) {
|
|
43
|
+
accounts.paymentAccount.value = await findPaymentAccountPda({
|
|
44
|
+
owner: getAddressFromResolvedInstructionAccount("owner", accounts.owner.value),
|
|
45
|
+
tokenProgram: getAddressFromResolvedInstructionAccount("tokenProgram", accounts.tokenProgram.value),
|
|
46
|
+
mint: getAddressFromResolvedInstructionAccount("mint", accounts.mint.value),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (!accounts.arbiterAccount.value) {
|
|
50
|
+
accounts.arbiterAccount.value =
|
|
51
|
+
await findSetApprovedArbiterArbiterAccountPda({
|
|
52
|
+
arbiter: getNonNullResolvedInstructionInput("arbiter", args.arbiter),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
56
|
+
return Object.freeze({
|
|
57
|
+
accounts: [
|
|
58
|
+
getAccountMeta("owner", accounts.owner),
|
|
59
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
60
|
+
getAccountMeta("arbiterAccount", accounts.arbiterAccount),
|
|
61
|
+
getAccountMeta("mint", accounts.mint),
|
|
62
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
63
|
+
],
|
|
64
|
+
data: getSetApprovedArbiterInstructionDataEncoder().encode(args),
|
|
65
|
+
programAddress,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function getSetApprovedArbiterInstruction(input, config) {
|
|
69
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
70
|
+
const originalAccounts = {
|
|
71
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
72
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: true },
|
|
73
|
+
arbiterAccount: { value: input.arbiterAccount ?? null, isWritable: false },
|
|
74
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
75
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
76
|
+
};
|
|
77
|
+
const accounts = originalAccounts;
|
|
78
|
+
const args = { ...input };
|
|
79
|
+
if (!accounts.tokenProgram.value) {
|
|
80
|
+
accounts.tokenProgram.value =
|
|
81
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
82
|
+
}
|
|
83
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
84
|
+
return Object.freeze({
|
|
85
|
+
accounts: [
|
|
86
|
+
getAccountMeta("owner", accounts.owner),
|
|
87
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
88
|
+
getAccountMeta("arbiterAccount", accounts.arbiterAccount),
|
|
89
|
+
getAccountMeta("mint", accounts.mint),
|
|
90
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
91
|
+
],
|
|
92
|
+
data: getSetApprovedArbiterInstructionDataEncoder().encode(args),
|
|
93
|
+
programAddress,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export function parseSetApprovedArbiterInstruction(instruction) {
|
|
97
|
+
if (instruction.accounts.length < 5) {
|
|
98
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
99
|
+
actualAccountMetas: instruction.accounts.length,
|
|
100
|
+
expectedAccountMetas: 5,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
let accountIndex = 0;
|
|
104
|
+
const getNextAccount = () => {
|
|
105
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
106
|
+
accountIndex += 1;
|
|
107
|
+
return accountMeta;
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
programAddress: instruction.programAddress,
|
|
111
|
+
accounts: {
|
|
112
|
+
owner: getNextAccount(),
|
|
113
|
+
paymentAccount: getNextAccount(),
|
|
114
|
+
arbiterAccount: getNextAccount(),
|
|
115
|
+
mint: getNextAccount(),
|
|
116
|
+
tokenProgram: getNextAccount(),
|
|
117
|
+
},
|
|
118
|
+
data: getSetApprovedArbiterInstructionDataDecoder().decode(instruction.data),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=setApprovedArbiter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setApprovedArbiter.js","sourceRoot":"","sources":["../../../src/generated/instructions/setApprovedArbiter.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,EACxC,kCAAkC,GAEnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,uCAAuC,GACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,CAAC,MAAM,kCAAkC,GAC7C,IAAI,UAAU,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEzD,MAAM,UAAU,uCAAuC;IACrD,OAAO,cAAc,CAAC,e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
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
2
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
3
|
+
export declare const SET_AUTHORIZED_CREDENTIAL_DISCRIMINATOR: ReadonlyUint8Array;
|
|
4
|
+
export declare function getSetAuthorizedCredentialDiscriminatorBytes(): ReadonlyUint8Array;
|
|
5
|
+
export type SetAuthorizedCredentialInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountPaymentAccount extends string | AccountMeta<string> = string, TAccountEscrowTokenAccount extends string | AccountMeta<string> = string, TAccountAsset extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
6
|
+
TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
7
|
+
TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer,
|
|
8
|
+
TAccountPaymentAccount extends string ? WritableAccount<TAccountPaymentAccount> : TAccountPaymentAccount,
|
|
9
|
+
TAccountEscrowTokenAccount extends string ? WritableSignerAccount<TAccountEscrowTokenAccount> & AccountSignerMeta<TAccountEscrowTokenAccount> : TAccountEscrowTokenAccount,
|
|
10
|
+
TAccountAsset extends string ? ReadonlyAccount<TAccountAsset> : TAccountAsset,
|
|
11
|
+
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
|
|
12
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
13
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
14
|
+
...TRemainingAccounts
|
|
15
|
+
]>;
|
|
16
|
+
export type SetAuthorizedCredentialInstructionData = {
|
|
17
|
+
discriminator: ReadonlyUint8Array;
|
|
18
|
+
};
|
|
19
|
+
export type SetAuthorizedCredentialInstructionDataArgs = {};
|
|
20
|
+
export declare function getSetAuthorizedCredentialInstructionDataEncoder(): FixedSizeEncoder<SetAuthorizedCredentialInstructionDataArgs>;
|
|
21
|
+
export declare function getSetAuthorizedCredentialInstructionDataDecoder(): FixedSizeDecoder<SetAuthorizedCredentialInstructionData>;
|
|
22
|
+
export declare function getSetAuthorizedCredentialInstructionDataCodec(): FixedSizeCodec<SetAuthorizedCredentialInstructionDataArgs, SetAuthorizedCredentialInstructionData>;
|
|
23
|
+
export type SetAuthorizedCredentialAsyncInput<TAccountOwner extends string = string, TAccountPayer extends string = string, TAccountPaymentAccount extends string = string, TAccountEscrowTokenAccount extends string = string, TAccountAsset extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
24
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
25
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
26
|
+
paymentAccount?: Address<TAccountPaymentAccount>;
|
|
27
|
+
escrowTokenAccount: TransactionSigner<TAccountEscrowTokenAccount>;
|
|
28
|
+
asset: Address<TAccountAsset>;
|
|
29
|
+
mint: Address<TAccountMint>;
|
|
30
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
31
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
32
|
+
};
|
|
33
|
+
export declare function getSetAuthorizedCredentialInstructionAsync<TAccountOwner extends string, TAccountPayer extends string, TAccountPaymentAccount extends string, TAccountEscrowTokenAccount extends string, TAccountAsset extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS>(input: SetAuthorizedCredentialAsyncInput<TAccountOwner, TAccountPayer, TAccountPaymentAccount, TAccountEscrowTokenAccount, TAccountAsset, TAccountMint, TAccountTokenProgram, TAccountSystemProgram>, config?: {
|
|
34
|
+
programAddress?: TProgramAddress;
|
|
35
|
+
}): Promise<SetAuthorizedCredentialInstruction<TProgramAddress, TAccountOwner, TAccountPayer, TAccountPaymentAccount, TAccountEscrowTokenAccount, TAccountAsset, TAccountMint, TAccountTokenProgram, TAccountSystemProgram>>;
|
|
36
|
+
export type SetAuthorizedCredentialInput<TAccountOwner extends string = string, TAccountPayer extends string = string, TAccountPaymentAccount extends string = string, TAccountEscrowTokenAccount extends string = string, TAccountAsset extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
37
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
38
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
39
|
+
paymentAccount: Address<TAccountPaymentAccount>;
|
|
40
|
+
escrowTokenAccount: TransactionSigner<TAccountEscrowTokenAccount>;
|
|
41
|
+
asset: Address<TAccountAsset>;
|
|
42
|
+
mint: Address<TAccountMint>;
|
|
43
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
44
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
45
|
+
};
|
|
46
|
+
export declare function getSetAuthorizedCredentialInstruction<TAccountOwner extends string, TAccountPayer extends string, TAccountPaymentAccount extends string, TAccountEscrowTokenAccount extends string, TAccountAsset extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS>(input: SetAuthorizedCredentialInput<TAccountOwner, TAccountPayer, TAccountPaymentAccount, TAccountEscrowTokenAccount, TAccountAsset, TAccountMint, TAccountTokenProgram, TAccountSystemProgram>, config?: {
|
|
47
|
+
programAddress?: TProgramAddress;
|
|
48
|
+
}): SetAuthorizedCredentialInstruction<TProgramAddress, TAccountOwner, TAccountPayer, TAccountPaymentAccount, TAccountEscrowTokenAccount, TAccountAsset, TAccountMint, TAccountTokenProgram, TAccountSystemProgram>;
|
|
49
|
+
export type ParsedSetAuthorizedCredentialInstruction<TProgram extends string = typeof PHYGITAL_PAYMENT_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
50
|
+
programAddress: Address<TProgram>;
|
|
51
|
+
accounts: {
|
|
52
|
+
owner: TAccountMetas[0];
|
|
53
|
+
payer: TAccountMetas[1];
|
|
54
|
+
paymentAccount: TAccountMetas[2];
|
|
55
|
+
escrowTokenAccount: TAccountMetas[3];
|
|
56
|
+
asset: TAccountMetas[4];
|
|
57
|
+
mint: TAccountMetas[5];
|
|
58
|
+
tokenProgram: TAccountMetas[6];
|
|
59
|
+
systemProgram: TAccountMetas[7];
|
|
60
|
+
};
|
|
61
|
+
data: SetAuthorizedCredentialInstructionData;
|
|
62
|
+
};
|
|
63
|
+
export declare function parseSetAuthorizedCredentialInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetAuthorizedCredentialInstruction<TProgram, TAccountMetas>;
|
|
64
|
+
//# sourceMappingURL=setAuthorizedCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setAuthorizedCredential.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/setAuthorizedCredential.ts"],"names":[],"mappings":"AAQA,OAAO,EAWL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO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b,sBAAsB,EACtB,0BAA0B,EAC1B,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,CACtB,CA2DA;AAED,MAAM,MAAM,wCAAwC,CAClD,QAAQ,SAAS,MAAM,GAAG,OAAO,gCAAgC,EACjE,aAAa,SAAS,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE,IACnE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACjC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC/B,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,sCAAsC,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uCAAuC,CACrD,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,wCAAwC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAgCnE"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
2
|
+
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, } from "@solana/program-client-core";
|
|
3
|
+
import { findPaymentAccountPda } from "../pdas/index.js";
|
|
4
|
+
import { PHYGITAL_PAYMENT_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
5
|
+
export const SET_AUTHORIZED_CREDENTIAL_DISCRIMINATOR = new Uint8Array([17, 199, 52, 243, 218, 208, 6, 72]);
|
|
6
|
+
export function getSetAuthorizedCredentialDiscriminatorBytes() {
|
|
7
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(SET_AUTHORIZED_CREDENTIAL_DISCRIMINATOR);
|
|
8
|
+
}
|
|
9
|
+
export function getSetAuthorizedCredentialInstructionDataEncoder() {
|
|
10
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({
|
|
11
|
+
...value,
|
|
12
|
+
discriminator: SET_AUTHORIZED_CREDENTIAL_DISCRIMINATOR,
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
export function getSetAuthorizedCredentialInstructionDataDecoder() {
|
|
16
|
+
return getStructDecoder([
|
|
17
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
export function getSetAuthorizedCredentialInstructionDataCodec() {
|
|
21
|
+
return combineCodec(getSetAuthorizedCredentialInstructionDataEncoder(), getSetAuthorizedCredentialInstructionDataDecoder());
|
|
22
|
+
}
|
|
23
|
+
export async function getSetAuthorizedCredentialInstructionAsync(input, config) {
|
|
24
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
25
|
+
const originalAccounts = {
|
|
26
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
27
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
28
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: true },
|
|
29
|
+
escrowTokenAccount: {
|
|
30
|
+
value: input.escrowTokenAccount ?? null,
|
|
31
|
+
isWritable: true,
|
|
32
|
+
},
|
|
33
|
+
asset: { value: input.asset ?? null, isWritable: false },
|
|
34
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
35
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
36
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
37
|
+
};
|
|
38
|
+
const accounts = originalAccounts;
|
|
39
|
+
if (!accounts.tokenProgram.value) {
|
|
40
|
+
accounts.tokenProgram.value =
|
|
41
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
42
|
+
}
|
|
43
|
+
if (!accounts.paymentAccount.value) {
|
|
44
|
+
accounts.paymentAccount.value = await findPaymentAccountPda({
|
|
45
|
+
owner: getAddressFromResolvedInstructionAccount("owner", accounts.owner.value),
|
|
46
|
+
tokenProgram: getAddressFromResolvedInstructionAccount("tokenProgram", accounts.tokenProgram.value),
|
|
47
|
+
mint: getAddressFromResolvedInstructionAccount("mint", accounts.mint.value),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (!accounts.systemProgram.value) {
|
|
51
|
+
accounts.systemProgram.value =
|
|
52
|
+
"11111111111111111111111111111111";
|
|
53
|
+
}
|
|
54
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
55
|
+
return Object.freeze({
|
|
56
|
+
accounts: [
|
|
57
|
+
getAccountMeta("owner", accounts.owner),
|
|
58
|
+
getAccountMeta("payer", accounts.payer),
|
|
59
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
60
|
+
getAccountMeta("escrowTokenAccount", accounts.escrowTokenAccount),
|
|
61
|
+
getAccountMeta("asset", accounts.asset),
|
|
62
|
+
getAccountMeta("mint", accounts.mint),
|
|
63
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
64
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
65
|
+
],
|
|
66
|
+
data: getSetAuthorizedCredentialInstructionDataEncoder().encode({}),
|
|
67
|
+
programAddress,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export function getSetAuthorizedCredentialInstruction(input, config) {
|
|
71
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
72
|
+
const originalAccounts = {
|
|
73
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
74
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
75
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: true },
|
|
76
|
+
escrowTokenAccount: {
|
|
77
|
+
value: input.escrowTokenAccount ?? null,
|
|
78
|
+
isWritable: true,
|
|
79
|
+
},
|
|
80
|
+
asset: { value: input.asset ?? null, isWritable: false },
|
|
81
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
82
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
83
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
84
|
+
};
|
|
85
|
+
const accounts = originalAccounts;
|
|
86
|
+
if (!accounts.tokenProgram.value) {
|
|
87
|
+
accounts.tokenProgram.value =
|
|
88
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
89
|
+
}
|
|
90
|
+
if (!accounts.systemProgram.value) {
|
|
91
|
+
accounts.systemProgram.value =
|
|
92
|
+
"11111111111111111111111111111111";
|
|
93
|
+
}
|
|
94
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
95
|
+
return Object.freeze({
|
|
96
|
+
accounts: [
|
|
97
|
+
getAccountMeta("owner", accounts.owner),
|
|
98
|
+
getAccountMeta("payer", accounts.payer),
|
|
99
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
100
|
+
getAccountMeta("escrowTokenAccount", accounts.escrowTokenAccount),
|
|
101
|
+
getAccountMeta("asset", accounts.asset),
|
|
102
|
+
getAccountMeta("mint", accounts.mint),
|
|
103
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
104
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
105
|
+
],
|
|
106
|
+
data: getSetAuthorizedCredentialInstructionDataEncoder().encode({}),
|
|
107
|
+
programAddress,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export function parseSetAuthorizedCredentialInstruction(instruction) {
|
|
111
|
+
if (instruction.accounts.length < 8) {
|
|
112
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
113
|
+
actualAccountMetas: instruction.accounts.length,
|
|
114
|
+
expectedAccountMetas: 8,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
let accountIndex = 0;
|
|
118
|
+
const getNextAccount = () => {
|
|
119
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
120
|
+
accountIndex += 1;
|
|
121
|
+
return accountMeta;
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
programAddress: instruction.programAddress,
|
|
125
|
+
accounts: {
|
|
126
|
+
owner: getNextAccount(),
|
|
127
|
+
payer: getNextAccount(),
|
|
128
|
+
paymentAccount: getNextAccount(),
|
|
129
|
+
escrowTokenAccount: getNextAccount(),
|
|
130
|
+
asset: getNextAccount(),
|
|
131
|
+
mint: getNextAccount(),
|
|
132
|
+
tokenProgram: getNextAccount(),
|
|
133
|
+
systemProgram: getNextAccount(),
|
|
134
|
+
},
|
|
135
|
+
data: getSetAuthorizedCredentialInstructionDataDecoder().decode(instruction.data),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=setAuthorizedCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setAuthorizedCredential.js","sourceRoot":"","sources":["../../../src/generated/instructions/setAuthorizedCredential.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB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