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,132 @@
|
|
|
1
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, 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 WITHDRAW_FROM_ESCROW_DISCRIMINATOR = new Uint8Array([235, 206, 216, 253, 47, 163, 169, 231]);
|
|
6
|
+
export function getWithdrawFromEscrowDiscriminatorBytes() {
|
|
7
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(WITHDRAW_FROM_ESCROW_DISCRIMINATOR);
|
|
8
|
+
}
|
|
9
|
+
export function getWithdrawFromEscrowInstructionDataEncoder() {
|
|
10
|
+
return transformEncoder(getStructEncoder([
|
|
11
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
12
|
+
["amount", getU64Encoder()],
|
|
13
|
+
]), (value) => ({
|
|
14
|
+
...value,
|
|
15
|
+
discriminator: WITHDRAW_FROM_ESCROW_DISCRIMINATOR,
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
export function getWithdrawFromEscrowInstructionDataDecoder() {
|
|
19
|
+
return getStructDecoder([
|
|
20
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
21
|
+
["amount", getU64Decoder()],
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
export function getWithdrawFromEscrowInstructionDataCodec() {
|
|
25
|
+
return combineCodec(getWithdrawFromEscrowInstructionDataEncoder(), getWithdrawFromEscrowInstructionDataDecoder());
|
|
26
|
+
}
|
|
27
|
+
export async function getWithdrawFromEscrowInstructionAsync(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: false },
|
|
32
|
+
escrowTokenAccount: {
|
|
33
|
+
value: input.escrowTokenAccount ?? null,
|
|
34
|
+
isWritable: true,
|
|
35
|
+
},
|
|
36
|
+
ownerTokenAccount: {
|
|
37
|
+
value: input.ownerTokenAccount ?? null,
|
|
38
|
+
isWritable: true,
|
|
39
|
+
},
|
|
40
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
41
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
42
|
+
};
|
|
43
|
+
const accounts = originalAccounts;
|
|
44
|
+
const args = { ...input };
|
|
45
|
+
if (!accounts.tokenProgram.value) {
|
|
46
|
+
accounts.tokenProgram.value =
|
|
47
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
48
|
+
}
|
|
49
|
+
if (!accounts.paymentAccount.value) {
|
|
50
|
+
accounts.paymentAccount.value = await findPaymentAccountPda({
|
|
51
|
+
owner: getAddressFromResolvedInstructionAccount("owner", accounts.owner.value),
|
|
52
|
+
tokenProgram: getAddressFromResolvedInstructionAccount("tokenProgram", accounts.tokenProgram.value),
|
|
53
|
+
mint: getAddressFromResolvedInstructionAccount("mint", accounts.mint.value),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
accounts: [
|
|
59
|
+
getAccountMeta("owner", accounts.owner),
|
|
60
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
61
|
+
getAccountMeta("escrowTokenAccount", accounts.escrowTokenAccount),
|
|
62
|
+
getAccountMeta("ownerTokenAccount", accounts.ownerTokenAccount),
|
|
63
|
+
getAccountMeta("mint", accounts.mint),
|
|
64
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
65
|
+
],
|
|
66
|
+
data: getWithdrawFromEscrowInstructionDataEncoder().encode(args),
|
|
67
|
+
programAddress,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export function getWithdrawFromEscrowInstruction(input, config) {
|
|
71
|
+
const programAddress = config?.programAddress ?? PHYGITAL_PAYMENT_PROGRAM_ADDRESS;
|
|
72
|
+
const originalAccounts = {
|
|
73
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
74
|
+
paymentAccount: { value: input.paymentAccount ?? null, isWritable: false },
|
|
75
|
+
escrowTokenAccount: {
|
|
76
|
+
value: input.escrowTokenAccount ?? null,
|
|
77
|
+
isWritable: true,
|
|
78
|
+
},
|
|
79
|
+
ownerTokenAccount: {
|
|
80
|
+
value: input.ownerTokenAccount ?? null,
|
|
81
|
+
isWritable: true,
|
|
82
|
+
},
|
|
83
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
84
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
85
|
+
};
|
|
86
|
+
const accounts = originalAccounts;
|
|
87
|
+
const args = { ...input };
|
|
88
|
+
if (!accounts.tokenProgram.value) {
|
|
89
|
+
accounts.tokenProgram.value =
|
|
90
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
91
|
+
}
|
|
92
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
93
|
+
return Object.freeze({
|
|
94
|
+
accounts: [
|
|
95
|
+
getAccountMeta("owner", accounts.owner),
|
|
96
|
+
getAccountMeta("paymentAccount", accounts.paymentAccount),
|
|
97
|
+
getAccountMeta("escrowTokenAccount", accounts.escrowTokenAccount),
|
|
98
|
+
getAccountMeta("ownerTokenAccount", accounts.ownerTokenAccount),
|
|
99
|
+
getAccountMeta("mint", accounts.mint),
|
|
100
|
+
getAccountMeta("tokenProgram", accounts.tokenProgram),
|
|
101
|
+
],
|
|
102
|
+
data: getWithdrawFromEscrowInstructionDataEncoder().encode(args),
|
|
103
|
+
programAddress,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export function parseWithdrawFromEscrowInstruction(instruction) {
|
|
107
|
+
if (instruction.accounts.length < 6) {
|
|
108
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
109
|
+
actualAccountMetas: instruction.accounts.length,
|
|
110
|
+
expectedAccountMetas: 6,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
let accountIndex = 0;
|
|
114
|
+
const getNextAccount = () => {
|
|
115
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
116
|
+
accountIndex += 1;
|
|
117
|
+
return accountMeta;
|
|
118
|
+
};
|
|
119
|
+
return {
|
|
120
|
+
programAddress: instruction.programAddress,
|
|
121
|
+
accounts: {
|
|
122
|
+
owner: getNextAccount(),
|
|
123
|
+
paymentAccount: getNextAccount(),
|
|
124
|
+
escrowTokenAccount: getNextAccount(),
|
|
125
|
+
ownerTokenAccount: getNextAccount(),
|
|
126
|
+
mint: getNextAccount(),
|
|
127
|
+
tokenProgram: getNextAccount(),
|
|
128
|
+
},
|
|
129
|
+
data: getWithdrawFromEscrowInstructionDataDecoder().decode(instruction.data),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=withdrawFromEscrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withdrawFromEscrow.js","sourceRoot":"","sources":["../../../src/generated/instructions/withdrawFromEscrow.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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AAM,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,KAAK,EAAE,cAAc,EAAE;YACvB,cAAc,EAAE,cAAc,EAAE;YAChC,kBAAkB,EAAE,cAAc,EAAE;YACpC,iBAAiB,EAAE,cAAc,EAAE;YACnC,IAAI,EAAE,cAAc,EAAE;YACtB,YAAY,EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,2CAA2C,EAAE,CAAC,MAAM,CACxD,WAAW,CAAC,IAAI,CACjB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Address, type ProgramDerivedAddress } from "@solana/kit";
|
|
2
|
+
export type ArbiterAccountSeeds = {
|
|
3
|
+
authority: Address;
|
|
4
|
+
};
|
|
5
|
+
export declare function findArbiterAccountPda(seeds: ArbiterAccountSeeds, config?: {
|
|
6
|
+
programAddress?: Address | undefined;
|
|
7
|
+
}): Promise<ProgramDerivedAddress>;
|
|
8
|
+
//# sourceMappingURL=arbiterAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbiterAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/arbiterAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAahC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, } from "@solana/kit";
|
|
2
|
+
export async function findArbiterAccountPda(seeds, config = {}) {
|
|
3
|
+
const { programAddress = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV", } = config;
|
|
4
|
+
return await getProgramDerivedAddress({
|
|
5
|
+
programAddress,
|
|
6
|
+
seeds: [
|
|
7
|
+
getBytesEncoder().encode(new Uint8Array([97, 114, 98, 105, 116, 101, 114])),
|
|
8
|
+
getAddressEncoder().encode(seeds.authority),
|
|
9
|
+
],
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=arbiterAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbiterAccount.js","sourceRoot":"","sources":["../../../src/generated/pdas/arbiterAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,wBAAwB,GAGzB,MAAM,aAAa,CAAC;AAMrB,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAA0B,EAC1B,SAAmD,EAAE;IAErD,MAAM,EACJ,cAAc,GAAG,8CAAyG,GAC3H,GAAG,MAAM,CAAC;IACX,OAAO,MAAM,wBAAwB,CAAC;QACpC,cAAc;QACd,KAAK,EAAE;YACL,eAAe,EAAE,CAAC,MAAM,CACtB,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAClD;YACD,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;SAC5C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/index.ts"],"names":[],"mappings":"AAQA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/pdas/index.ts"],"names":[],"mappings":"AAQA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Address, type ProgramDerivedAddress } from "@solana/kit";
|
|
2
|
+
export type MerchantOperatorSeeds = {
|
|
3
|
+
treasury: Address;
|
|
4
|
+
operator: Address;
|
|
5
|
+
};
|
|
6
|
+
export declare function findMerchantOperatorPda(seeds: MerchantOperatorSeeds, config?: {
|
|
7
|
+
programAddress?: Address | undefined;
|
|
8
|
+
}): Promise<ProgramDerivedAddress>;
|
|
9
|
+
//# sourceMappingURL=merchantOperator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merchantOperator.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/merchantOperator.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,qBAAqB,EAC5B,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAiBhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, } from "@solana/kit";
|
|
2
|
+
export async function findMerchantOperatorPda(seeds, config = {}) {
|
|
3
|
+
const { programAddress = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV", } = config;
|
|
4
|
+
return await getProgramDerivedAddress({
|
|
5
|
+
programAddress,
|
|
6
|
+
seeds: [
|
|
7
|
+
getBytesEncoder().encode(new Uint8Array([
|
|
8
|
+
109, 101, 114, 99, 104, 97, 110, 116, 95, 111, 112, 101, 114, 97, 116,
|
|
9
|
+
111, 114,
|
|
10
|
+
])),
|
|
11
|
+
getAddressEncoder().encode(seeds.treasury),
|
|
12
|
+
getAddressEncoder().encode(seeds.operator),
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=merchantOperator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merchantOperator.js","sourceRoot":"","sources":["../../../src/generated/pdas/merchantOperator.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,wBAAwB,GAGzB,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAA4B,EAC5B,SAAmD,EAAE;IAErD,MAAM,EACJ,cAAc,GAAG,8CAAyG,GAC3H,GAAG,MAAM,CAAC;IACX,OAAO,MAAM,wBAAwB,CAAC;QACpC,cAAc;QACd,KAAK,EAAE;YACL,eAAe,EAAE,CAAC,MAAM,CACtB,IAAI,UAAU,CAAC;gBACb,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;gBACrE,GAAG,EAAE,GAAG;aACT,CAAC,CACH;YACD,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC1C,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;SAC3C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Address, type ProgramDerivedAddress, type ReadonlyUint8Array } from "@solana/kit";
|
|
2
|
+
export type PaymentSeeds = {
|
|
3
|
+
paymentAccount: Address;
|
|
4
|
+
reference: ReadonlyUint8Array;
|
|
5
|
+
};
|
|
6
|
+
export declare function findPaymentPda(seeds: PaymentSeeds, config?: {
|
|
7
|
+
programAddress?: Address | undefined;
|
|
8
|
+
}): Promise<ProgramDerivedAddress>;
|
|
9
|
+
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/payment.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,YAAY,GAAG;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,wBAAsB,cAAc,CAClC,KAAK,EAAE,YAAY,EACnB,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAchC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { fixEncoderSize, getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, } from "@solana/kit";
|
|
2
|
+
export async function findPaymentPda(seeds, config = {}) {
|
|
3
|
+
const { programAddress = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV", } = config;
|
|
4
|
+
return await getProgramDerivedAddress({
|
|
5
|
+
programAddress,
|
|
6
|
+
seeds: [
|
|
7
|
+
getBytesEncoder().encode(new Uint8Array([112, 97, 121, 109, 101, 110, 116])),
|
|
8
|
+
getAddressEncoder().encode(seeds.paymentAccount),
|
|
9
|
+
fixEncoderSize(getBytesEncoder(), 32).encode(seeds.reference),
|
|
10
|
+
],
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=payment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/generated/pdas/payment.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,wBAAwB,GAIzB,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAmB,EACnB,SAAmD,EAAE;IAErD,MAAM,EACJ,cAAc,GAAG,8CAAyG,GAC3H,GAAG,MAAM,CAAC;IACX,OAAO,MAAM,wBAAwB,CAAC;QACpC,cAAc;QACd,KAAK,EAAE;YACL,eAAe,EAAE,CAAC,MAAM,CACtB,IAAI,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CACnD;YACD,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;YAChD,cAAc,CAAC,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;SAC9D;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Address, type ProgramDerivedAddress } from "@solana/kit";
|
|
2
|
+
export type PaymentAccountSeeds = {
|
|
3
|
+
owner: Address;
|
|
4
|
+
tokenProgram: Address;
|
|
5
|
+
mint: Address;
|
|
6
|
+
};
|
|
7
|
+
export declare function findPaymentAccountPda(seeds: PaymentAccountSeeds, config?: {
|
|
8
|
+
programAddress?: Address | undefined;
|
|
9
|
+
}): Promise<ProgramDerivedAddress>;
|
|
10
|
+
//# sourceMappingURL=paymentAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/paymentAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAiBhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, } from "@solana/kit";
|
|
2
|
+
export async function findPaymentAccountPda(seeds, config = {}) {
|
|
3
|
+
const { programAddress = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV", } = config;
|
|
4
|
+
return await getProgramDerivedAddress({
|
|
5
|
+
programAddress,
|
|
6
|
+
seeds: [
|
|
7
|
+
getBytesEncoder().encode(new Uint8Array([
|
|
8
|
+
112, 97, 121, 109, 101, 110, 116, 95, 97, 99, 99, 111, 117, 110, 116,
|
|
9
|
+
])),
|
|
10
|
+
getAddressEncoder().encode(seeds.owner),
|
|
11
|
+
getAddressEncoder().encode(seeds.tokenProgram),
|
|
12
|
+
getAddressEncoder().encode(seeds.mint),
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=paymentAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentAccount.js","sourceRoot":"","sources":["../../../src/generated/pdas/paymentAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,wBAAwB,GAGzB,MAAM,aAAa,CAAC;AAQrB,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAA0B,EAC1B,SAAmD,EAAE;IAErD,MAAM,EACJ,cAAc,GAAG,8CAAyG,GAC3H,GAAG,MAAM,CAAC;IACX,OAAO,MAAM,wBAAwB,CAAC;QACpC,cAAc;QACd,KAAK,EAAE;YACL,eAAe,EAAE,CAAC,MAAM,CACtB,IAAI,UAAU,CAAC;gBACb,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;aACrE,CAAC,CACH;YACD,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;YAC9C,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;SACvC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Address, type ProgramDerivedAddress } from "@solana/kit";
|
|
2
|
+
export type SetApprovedArbiterArbiterAccountSeeds = {
|
|
3
|
+
arbiter: Address;
|
|
4
|
+
};
|
|
5
|
+
export declare function findSetApprovedArbiterArbiterAccountPda(seeds: SetApprovedArbiterArbiterAccountSeeds, config?: {
|
|
6
|
+
programAddress?: Address | undefined;
|
|
7
|
+
}): Promise<ProgramDerivedAddress>;
|
|
8
|
+
//# sourceMappingURL=setApprovedArbiterArbiterAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setApprovedArbiterArbiterAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/pdas/setApprovedArbiterArbiterAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,qCAAqC,GAAG;IAClD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAsB,uCAAuC,CAC3D,KAAK,EAAE,qCAAqC,EAC5C,MAAM,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAahC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, } from "@solana/kit";
|
|
2
|
+
export async function findSetApprovedArbiterArbiterAccountPda(seeds, config = {}) {
|
|
3
|
+
const { programAddress = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV", } = config;
|
|
4
|
+
return await getProgramDerivedAddress({
|
|
5
|
+
programAddress,
|
|
6
|
+
seeds: [
|
|
7
|
+
getBytesEncoder().encode(new Uint8Array([97, 114, 98, 105, 116, 101, 114])),
|
|
8
|
+
getAddressEncoder().encode(seeds.arbiter),
|
|
9
|
+
],
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=setApprovedArbiterArbiterAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setApprovedArbiterArbiterAccount.js","sourceRoot":"","sources":["../../../src/generated/pdas/setApprovedArbiterArbiterAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,wBAAwB,GAGzB,MAAM,aAAa,CAAC;AAMrB,MAAM,CAAC,KAAK,UAAU,uCAAuC,CAC3D,KAA4C,EAC5C,SAAmD,EAAE;IAErD,MAAM,EACJ,cAAc,GAAG,8CAAyG,GAC3H,GAAG,MAAM,CAAC;IACX,OAAO,MAAM,wBAAwB,CAAC;QACpC,cAAc;QACd,KAAK,EAAE;YACL,eAAe,EAAE,CAAC,MAAM,CACtB,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAClD;YACD,iBAAiB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;SAC1C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/programs/index.ts"],"names":[],"mappings":"AAQA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/programs/index.ts"],"names":[],"mappings":"AAQA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type Address, type ClientWithPayer, type ClientWithRpc, type ClientWithTransactionPlanning, type ClientWithTransactionSending, type ExtendedClient, type GetAccountInfoApi, type GetMultipleAccountsApi, type Instruction, type InstructionWithData, type ReadonlyUint8Array } from "@solana/kit";
|
|
2
|
+
import { type SelfFetchFunctions, type SelfPlanAndSendFunctions } from "@solana/program-client-core";
|
|
3
|
+
import { getArbiterCodec, getMerchantOperatorCodec, getPaymentAccountCodec, getPaymentCodec, type Arbiter, type ArbiterArgs, type MerchantOperator, type MerchantOperatorArgs, type Payment, type PaymentAccount, type PaymentAccountArgs, type PaymentArgs } from "../accounts/index.js";
|
|
4
|
+
import { getAddMerchantOperatorInstructionAsync, getAutoRefundInstruction, getAutoSettleInstruction, getCloseExpiredPaymentInstruction, getDisputeAuthorizationInstructionAsync, getDisputeInstruction, getMerchantRefundInstruction, getMerchantRespondInstruction, getRefundSettledInstruction, getRegisterArbiterInstructionAsync, getRemoveMerchantOperatorInstructionAsync, getResolveDisputeInstruction, getSetApprovedArbiterInstructionAsync, getSetAuthorizedCredentialInstructionAsync, getSetPaymentEnablerInstructionAsync, getSetReserveInstructionAsync, getSetTapLimitInstructionAsync, getTransferInstructionAsync, getWithdrawDisputeInstruction, getWithdrawFromEscrowInstructionAsync, type AddMerchantOperatorAsyncInput, type AutoRefundInput, type AutoSettleInput, type CloseExpiredPaymentInput, type DisputeAuthorizationAsyncInput, type DisputeInput, type MerchantRefundInput, type MerchantRespondInput, type ParsedAddMerchantOperatorInstruction, type ParsedAutoRefundInstruction, type ParsedAutoSettleInstruction, type ParsedCloseExpiredPaymentInstruction, type ParsedDisputeAuthorizationInstruction, type ParsedDisputeInstruction, type ParsedMerchantRefundInstruction, type ParsedMerchantRespondInstruction, type ParsedRefundSettledInstruction, type ParsedRegisterArbiterInstruction, type ParsedRemoveMerchantOperatorInstruction, type ParsedResolveDisputeInstruction, type ParsedSetApprovedArbiterInstruction, type ParsedSetAuthorizedCredentialInstruction, type ParsedSetPaymentEnablerInstruction, type ParsedSetReserveInstruction, type ParsedSetTapLimitInstruction, type ParsedTransferInstruction, type ParsedWithdrawDisputeInstruction, type ParsedWithdrawFromEscrowInstruction, type RefundSettledInput, type RegisterArbiterAsyncInput, type RemoveMerchantOperatorAsyncInput, type ResolveDisputeInput, type SetApprovedArbiterAsyncInput, type SetAuthorizedCredentialAsyncInput, type SetPaymentEnablerAsyncInput, type SetReserveAsyncInput, type SetTapLimitAsyncInput, type TransferAsyncInput, type WithdrawDisputeInput, type WithdrawFromEscrowAsyncInput } from "../instructions/index.js";
|
|
5
|
+
import { findArbiterAccountPda, findMerchantOperatorPda, findPaymentAccountPda, findPaymentPda, findSetApprovedArbiterArbiterAccountPda } from "../pdas/index.js";
|
|
6
|
+
export declare const PHYGITAL_PAYMENT_PROGRAM_ADDRESS: Address<"Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV">;
|
|
7
|
+
export declare enum PhygitalPaymentAccount {
|
|
8
|
+
Arbiter = 0,
|
|
9
|
+
MerchantOperator = 1,
|
|
10
|
+
Payment = 2,
|
|
11
|
+
PaymentAccount = 3
|
|
12
|
+
}
|
|
13
|
+
export declare function identifyPhygitalPaymentAccount(account: {
|
|
14
|
+
data: ReadonlyUint8Array;
|
|
15
|
+
} | ReadonlyUint8Array): PhygitalPaymentAccount;
|
|
16
|
+
export declare enum PhygitalPaymentInstruction {
|
|
17
|
+
AddMerchantOperator = 0,
|
|
18
|
+
AutoRefund = 1,
|
|
19
|
+
AutoSettle = 2,
|
|
20
|
+
CloseExpiredPayment = 3,
|
|
21
|
+
Dispute = 4,
|
|
22
|
+
DisputeAuthorization = 5,
|
|
23
|
+
MerchantRefund = 6,
|
|
24
|
+
MerchantRespond = 7,
|
|
25
|
+
RefundSettled = 8,
|
|
26
|
+
RegisterArbiter = 9,
|
|
27
|
+
RemoveMerchantOperator = 10,
|
|
28
|
+
ResolveDispute = 11,
|
|
29
|
+
SetApprovedArbiter = 12,
|
|
30
|
+
SetAuthorizedCredential = 13,
|
|
31
|
+
SetPaymentEnabler = 14,
|
|
32
|
+
SetReserve = 15,
|
|
33
|
+
SetTapLimit = 16,
|
|
34
|
+
Transfer = 17,
|
|
35
|
+
WithdrawDispute = 18,
|
|
36
|
+
WithdrawFromEscrow = 19
|
|
37
|
+
}
|
|
38
|
+
export declare function identifyPhygitalPaymentInstruction(instruction: {
|
|
39
|
+
data: ReadonlyUint8Array;
|
|
40
|
+
} | ReadonlyUint8Array): PhygitalPaymentInstruction;
|
|
41
|
+
export type ParsedPhygitalPaymentInstruction<TProgram extends string = "Hy8HdxYZrPbAdMgMkL9ZVdJDNesZrihUVQLjoT16jacV"> = ({
|
|
42
|
+
instructionType: PhygitalPaymentInstruction.AddMerchantOperator;
|
|
43
|
+
} & ParsedAddMerchantOperatorInstruction<TProgram>) | ({
|
|
44
|
+
instructionType: PhygitalPaymentInstruction.AutoRefund;
|
|
45
|
+
} & ParsedAutoRefundInstruction<TProgram>) | ({
|
|
46
|
+
instructionType: PhygitalPaymentInstruction.AutoSettle;
|
|
47
|
+
} & ParsedAutoSettleInstruction<TProgram>) | ({
|
|
48
|
+
instructionType: PhygitalPaymentInstruction.CloseExpiredPayment;
|
|
49
|
+
} & ParsedCloseExpiredPaymentInstruction<TProgram>) | ({
|
|
50
|
+
instructionType: PhygitalPaymentInstruction.Dispute;
|
|
51
|
+
} & ParsedDisputeInstruction<TProgram>) | ({
|
|
52
|
+
instructionType: PhygitalPaymentInstruction.DisputeAuthorization;
|
|
53
|
+
} & ParsedDisputeAuthorizationInstruction<TProgram>) | ({
|
|
54
|
+
instructionType: PhygitalPaymentInstruction.MerchantRefund;
|
|
55
|
+
} & ParsedMerchantRefundInstruction<TProgram>) | ({
|
|
56
|
+
instructionType: PhygitalPaymentInstruction.MerchantRespond;
|
|
57
|
+
} & ParsedMerchantRespondInstruction<TProgram>) | ({
|
|
58
|
+
instructionType: PhygitalPaymentInstruction.RefundSettled;
|
|
59
|
+
} & ParsedRefundSettledInstruction<TProgram>) | ({
|
|
60
|
+
instructionType: PhygitalPaymentInstruction.RegisterArbiter;
|
|
61
|
+
} & ParsedRegisterArbiterInstruction<TProgram>) | ({
|
|
62
|
+
instructionType: PhygitalPaymentInstruction.RemoveMerchantOperator;
|
|
63
|
+
} & ParsedRemoveMerchantOperatorInstruction<TProgram>) | ({
|
|
64
|
+
instructionType: PhygitalPaymentInstruction.ResolveDispute;
|
|
65
|
+
} & ParsedResolveDisputeInstruction<TProgram>) | ({
|
|
66
|
+
instructionType: PhygitalPaymentInstruction.SetApprovedArbiter;
|
|
67
|
+
} & ParsedSetApprovedArbiterInstruction<TProgram>) | ({
|
|
68
|
+
instructionType: PhygitalPaymentInstruction.SetAuthorizedCredential;
|
|
69
|
+
} & ParsedSetAuthorizedCredentialInstruction<TProgram>) | ({
|
|
70
|
+
instructionType: PhygitalPaymentInstruction.SetPaymentEnabler;
|
|
71
|
+
} & ParsedSetPaymentEnablerInstruction<TProgram>) | ({
|
|
72
|
+
instructionType: PhygitalPaymentInstruction.SetReserve;
|
|
73
|
+
} & ParsedSetReserveInstruction<TProgram>) | ({
|
|
74
|
+
instructionType: PhygitalPaymentInstruction.SetTapLimit;
|
|
75
|
+
} & ParsedSetTapLimitInstruction<TProgram>) | ({
|
|
76
|
+
instructionType: PhygitalPaymentInstruction.Transfer;
|
|
77
|
+
} & ParsedTransferInstruction<TProgram>) | ({
|
|
78
|
+
instructionType: PhygitalPaymentInstruction.WithdrawDispute;
|
|
79
|
+
} & ParsedWithdrawDisputeInstruction<TProgram>) | ({
|
|
80
|
+
instructionType: PhygitalPaymentInstruction.WithdrawFromEscrow;
|
|
81
|
+
} & ParsedWithdrawFromEscrowInstruction<TProgram>);
|
|
82
|
+
export declare function parsePhygitalPaymentInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedPhygitalPaymentInstruction<TProgram>;
|
|
83
|
+
export type PhygitalPaymentPlugin = {
|
|
84
|
+
accounts: PhygitalPaymentPluginAccounts;
|
|
85
|
+
instructions: PhygitalPaymentPluginInstructions;
|
|
86
|
+
pdas: PhygitalPaymentPluginPdas;
|
|
87
|
+
identifyAccount: typeof identifyPhygitalPaymentAccount;
|
|
88
|
+
identifyInstruction: typeof identifyPhygitalPaymentInstruction;
|
|
89
|
+
parseInstruction: typeof parsePhygitalPaymentInstruction;
|
|
90
|
+
};
|
|
91
|
+
export type PhygitalPaymentPluginAccounts = {
|
|
92
|
+
arbiter: ReturnType<typeof getArbiterCodec> & SelfFetchFunctions<ArbiterArgs, Arbiter>;
|
|
93
|
+
merchantOperator: ReturnType<typeof getMerchantOperatorCodec> & SelfFetchFunctions<MerchantOperatorArgs, MerchantOperator>;
|
|
94
|
+
payment: ReturnType<typeof getPaymentCodec> & SelfFetchFunctions<PaymentArgs, Payment>;
|
|
95
|
+
paymentAccount: ReturnType<typeof getPaymentAccountCodec> & SelfFetchFunctions<PaymentAccountArgs, PaymentAccount>;
|
|
96
|
+
};
|
|
97
|
+
export type PhygitalPaymentPluginInstructions = {
|
|
98
|
+
addMerchantOperator: (input: AddMerchantOperatorAsyncInput) => ReturnType<typeof getAddMerchantOperatorInstructionAsync> & SelfPlanAndSendFunctions;
|
|
99
|
+
autoRefund: (input: AutoRefundInput) => ReturnType<typeof getAutoRefundInstruction> & SelfPlanAndSendFunctions;
|
|
100
|
+
autoSettle: (input: AutoSettleInput) => ReturnType<typeof getAutoSettleInstruction> & SelfPlanAndSendFunctions;
|
|
101
|
+
closeExpiredPayment: (input: CloseExpiredPaymentInput) => ReturnType<typeof getCloseExpiredPaymentInstruction> & SelfPlanAndSendFunctions;
|
|
102
|
+
dispute: (input: DisputeInput) => ReturnType<typeof getDisputeInstruction> & SelfPlanAndSendFunctions;
|
|
103
|
+
disputeAuthorization: (input: DisputeAuthorizationAsyncInput) => ReturnType<typeof getDisputeAuthorizationInstructionAsync> & SelfPlanAndSendFunctions;
|
|
104
|
+
merchantRefund: (input: MerchantRefundInput) => ReturnType<typeof getMerchantRefundInstruction> & SelfPlanAndSendFunctions;
|
|
105
|
+
merchantRespond: (input: MerchantRespondInput) => ReturnType<typeof getMerchantRespondInstruction> & SelfPlanAndSendFunctions;
|
|
106
|
+
refundSettled: (input: RefundSettledInput) => ReturnType<typeof getRefundSettledInstruction> & SelfPlanAndSendFunctions;
|
|
107
|
+
registerArbiter: (input: RegisterArbiterAsyncInput) => ReturnType<typeof getRegisterArbiterInstructionAsync> & SelfPlanAndSendFunctions;
|
|
108
|
+
removeMerchantOperator: (input: RemoveMerchantOperatorAsyncInput) => ReturnType<typeof getRemoveMerchantOperatorInstructionAsync> & SelfPlanAndSendFunctions;
|
|
109
|
+
resolveDispute: (input: ResolveDisputeInput) => ReturnType<typeof getResolveDisputeInstruction> & SelfPlanAndSendFunctions;
|
|
110
|
+
setApprovedArbiter: (input: SetApprovedArbiterAsyncInput) => ReturnType<typeof getSetApprovedArbiterInstructionAsync> & SelfPlanAndSendFunctions;
|
|
111
|
+
setAuthorizedCredential: (input: MakeOptional<SetAuthorizedCredentialAsyncInput, "payer">) => ReturnType<typeof getSetAuthorizedCredentialInstructionAsync> & SelfPlanAndSendFunctions;
|
|
112
|
+
setPaymentEnabler: (input: MakeOptional<SetPaymentEnablerAsyncInput, "payer">) => ReturnType<typeof getSetPaymentEnablerInstructionAsync> & SelfPlanAndSendFunctions;
|
|
113
|
+
setReserve: (input: SetReserveAsyncInput) => ReturnType<typeof getSetReserveInstructionAsync> & SelfPlanAndSendFunctions;
|
|
114
|
+
setTapLimit: (input: SetTapLimitAsyncInput) => ReturnType<typeof getSetTapLimitInstructionAsync> & SelfPlanAndSendFunctions;
|
|
115
|
+
transfer: (input: TransferAsyncInput) => ReturnType<typeof getTransferInstructionAsync> & SelfPlanAndSendFunctions;
|
|
116
|
+
withdrawDispute: (input: MakeOptional<WithdrawDisputeInput, "payer">) => ReturnType<typeof getWithdrawDisputeInstruction> & SelfPlanAndSendFunctions;
|
|
117
|
+
withdrawFromEscrow: (input: WithdrawFromEscrowAsyncInput) => ReturnType<typeof getWithdrawFromEscrowInstructionAsync> & SelfPlanAndSendFunctions;
|
|
118
|
+
};
|
|
119
|
+
export type PhygitalPaymentPluginPdas = {
|
|
120
|
+
merchantOperator: typeof findMerchantOperatorPda;
|
|
121
|
+
paymentAccount: typeof findPaymentAccountPda;
|
|
122
|
+
payment: typeof findPaymentPda;
|
|
123
|
+
arbiterAccount: typeof findArbiterAccountPda;
|
|
124
|
+
setApprovedArbiterArbiterAccount: typeof findSetApprovedArbiterArbiterAccountPda;
|
|
125
|
+
};
|
|
126
|
+
export type PhygitalPaymentPluginRequirements = ClientWithRpc<GetAccountInfoApi & GetMultipleAccountsApi> & ClientWithPayer & ClientWithTransactionPlanning & ClientWithTransactionSending;
|
|
127
|
+
export declare function phygitalPaymentProgram(): <T extends PhygitalPaymentPluginRequirements>(client: T) => ExtendedClient<T, {
|
|
128
|
+
phygitalPayment: PhygitalPaymentPlugin;
|
|
129
|
+
}>;
|
|
130
|
+
type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
131
|
+
export {};
|
|
132
|
+
//# sourceMappingURL=phygitalPayment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phygitalPayment.d.ts","sourceRoot":"","sources":["../../../src/generated/programs/phygitalPayment.ts"],"names":[],"mappings":"AAQA,OAAO,EAUL,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sCAAsC,EACtC,wBAAwB,EACxB,wBAAwB,EACxB,iCAAiC,EACjC,uCAAuC,EACvC,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,kCAAkC,EAClC,yCAAyC,EACzC,4BAA4B,EAC5B,qCAAqC,EACrC,0CAA0C,EAC1C,oCAAoC,EACpC,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,qCAAqC,EAqBrC,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KA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