@breadheads/bgl-game-pot
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -18,3 +18,2 @@ /** | ||
paymentAmount: bigint; | ||
balance: bigint; | ||
feePercentage: number; | ||
@@ -28,3 +27,2 @@ allowlist: Array<PublicKey>; | ||
paymentAmount: number | bigint; | ||
balance: number | bigint; | ||
feePercentage: number; | ||
@@ -45,3 +43,2 @@ allowlist: Array<PublicKey>; | ||
paymentAmount: number | bigint; | ||
balance: number | bigint; | ||
feePercentage: number; | ||
@@ -48,0 +45,0 @@ allowlist: Array<PublicKey>; |
@@ -21,3 +21,2 @@ "use strict"; | ||
['paymentAmount', (0, serializers_1.u64)()], | ||
['balance', (0, serializers_1.u64)()], | ||
['feePercentage', (0, serializers_1.u8)()], | ||
@@ -67,5 +66,4 @@ ['allowlist', (0, serializers_1.array)((0, serializers_1.publicKey)())], | ||
paymentAmount: [66, (0, serializers_1.u64)()], | ||
balance: [74, (0, serializers_1.u64)()], | ||
feePercentage: [82, (0, serializers_1.u8)()], | ||
allowlist: [83, (0, serializers_1.array)((0, serializers_1.publicKey)())], | ||
feePercentage: [74, (0, serializers_1.u8)()], | ||
allowlist: [75, (0, serializers_1.array)((0, serializers_1.publicKey)())], | ||
}) | ||
@@ -72,0 +70,0 @@ .deserializeUsing((account) => deserializeGamePot(account)) |
@@ -93,2 +93,14 @@ /** | ||
} | ||
/** PotTokenAccountNotFound: Pot Token Account Not Found */ | ||
export declare class PotTokenAccountNotFoundError extends ProgramError { | ||
readonly name: string; | ||
readonly code: number; | ||
constructor(program: Program, cause?: Error); | ||
} | ||
/** NumericalOverflow: Numerical Overflow */ | ||
export declare class NumericalOverflowError extends ProgramError { | ||
readonly name: string; | ||
readonly code: number; | ||
constructor(program: Program, cause?: Error); | ||
} | ||
/** | ||
@@ -95,0 +107,0 @@ * Attempts to resolve a custom program error from the provided error code. |
@@ -10,3 +10,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getBglGamePotErrorFromName = exports.getBglGamePotErrorFromCode = exports.InvalidPaymentTypeError = exports.ParticipantNotInAllowlistError = exports.InvalidTokenAccountOwnerError = exports.InvalidTokenMintForTokenAccountError = exports.InvalidAccountOwnerError = exports.InvalidAssociatedTokenProgramError = exports.InvalidDerivationForPotAccountError = exports.InvalidTokenMintError = exports.InvalidTokenProgramError = exports.PotNotEmptyError = exports.InvalidAuthorityError = exports.SerializationErrorError = exports.DeserializationErrorError = exports.InvalidSystemProgramError = void 0; | ||
exports.getBglGamePotErrorFromName = exports.getBglGamePotErrorFromCode = exports.NumericalOverflowError = exports.PotTokenAccountNotFoundError = exports.InvalidPaymentTypeError = exports.ParticipantNotInAllowlistError = exports.InvalidTokenAccountOwnerError = exports.InvalidTokenMintForTokenAccountError = exports.InvalidAccountOwnerError = exports.InvalidAssociatedTokenProgramError = exports.InvalidDerivationForPotAccountError = exports.InvalidTokenMintError = exports.InvalidTokenProgramError = exports.PotNotEmptyError = exports.InvalidAuthorityError = exports.SerializationErrorError = exports.DeserializationErrorError = exports.InvalidSystemProgramError = void 0; | ||
const umi_1 = require("@metaplex-foundation/umi"); | ||
@@ -169,2 +169,24 @@ const codeToErrorMap = new Map(); | ||
nameToErrorMap.set('InvalidPaymentType', InvalidPaymentTypeError); | ||
/** PotTokenAccountNotFound: Pot Token Account Not Found */ | ||
class PotTokenAccountNotFoundError extends umi_1.ProgramError { | ||
constructor(program, cause) { | ||
super('Pot Token Account Not Found', program, cause); | ||
this.name = 'PotTokenAccountNotFound'; | ||
this.code = 0xe; // 14 | ||
} | ||
} | ||
exports.PotTokenAccountNotFoundError = PotTokenAccountNotFoundError; | ||
codeToErrorMap.set(0xe, PotTokenAccountNotFoundError); | ||
nameToErrorMap.set('PotTokenAccountNotFound', PotTokenAccountNotFoundError); | ||
/** NumericalOverflow: Numerical Overflow */ | ||
class NumericalOverflowError extends umi_1.ProgramError { | ||
constructor(program, cause) { | ||
super('Numerical Overflow', program, cause); | ||
this.name = 'NumericalOverflow'; | ||
this.code = 0xf; // 15 | ||
} | ||
} | ||
exports.NumericalOverflowError = NumericalOverflowError; | ||
codeToErrorMap.set(0xf, NumericalOverflowError); | ||
nameToErrorMap.set('NumericalOverflow', NumericalOverflowError); | ||
/** | ||
@@ -171,0 +193,0 @@ * Attempts to resolve a custom program error from the provided error code. |
@@ -15,2 +15,4 @@ /** | ||
gameAuthority: Signer; | ||
/** The destination token account */ | ||
potTokenAccount?: PublicKey | Pda; | ||
}; | ||
@@ -17,0 +19,0 @@ export type ClosePotV1InstructionData = { |
@@ -32,2 +32,7 @@ "use strict"; | ||
}, | ||
potTokenAccount: { | ||
index: 2, | ||
isWritable: false, | ||
value: input.potTokenAccount ?? null, | ||
}, | ||
}; | ||
@@ -34,0 +39,0 @@ // Accounts in order. |
{ | ||
"name": "@breadheads/bgl-game-pot", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A way to accept and pay out tokens for participation in games.", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
103366
1630