@solana/spl-token-group
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -30,3 +30,3 @@ "use strict"; | ||
['updateAuthority', getPublicKeyEncoder()], | ||
['maxSize', (0, codecs_1.getU32Encoder)()], | ||
['maxSize', (0, codecs_1.getU64Encoder)()], | ||
])).encode({ updateAuthority: updateAuthority !== null && updateAuthority !== void 0 ? updateAuthority : web3_js_1.SystemProgram.programId, maxSize })), | ||
@@ -43,3 +43,3 @@ }); | ||
], | ||
data: Buffer.from(getInstructionEncoder((0, spl_type_length_value_1.splDiscriminate)('spl_token_group_interface:update_group_max_size'), (0, codecs_1.getStructEncoder)([['maxSize', (0, codecs_1.getU32Encoder)()]])).encode({ maxSize })), | ||
data: Buffer.from(getInstructionEncoder((0, spl_type_length_value_1.splDiscriminate)('spl_token_group_interface:update_group_max_size'), (0, codecs_1.getStructEncoder)([['maxSize', (0, codecs_1.getU64Encoder)()]])).encode({ maxSize })), | ||
}); | ||
@@ -46,0 +46,0 @@ } |
@@ -11,4 +11,4 @@ "use strict"; | ||
['mint', (0, codecs_1.fixCodecSize)((0, codecs_1.getBytesCodec)(), 32)], | ||
['size', (0, codecs_1.getU32Codec)()], | ||
['maxSize', (0, codecs_1.getU32Codec)()], | ||
['size', (0, codecs_1.getU64Codec)()], | ||
['maxSize', (0, codecs_1.getU64Codec)()], | ||
]); | ||
@@ -15,0 +15,0 @@ exports.TOKEN_GROUP_SIZE = tokenGroupCodec.fixedSize; |
@@ -11,3 +11,3 @@ "use strict"; | ||
['group', (0, codecs_1.fixCodecSize)((0, codecs_1.getBytesCodec)(), 32)], | ||
['memberNumber', (0, codecs_1.getU32Codec)()], | ||
['memberNumber', (0, codecs_1.getU64Codec)()], | ||
]); | ||
@@ -14,0 +14,0 @@ exports.TOKEN_GROUP_MEMBER_SIZE = tokenGroupMemberCodec.fixedSize; |
@@ -1,2 +0,2 @@ | ||
import { fixEncoderSize, getBytesEncoder, getStructEncoder, getTupleEncoder, getU32Encoder, transformEncoder, } from '@solana/codecs'; | ||
import { fixEncoderSize, getBytesEncoder, getStructEncoder, getTupleEncoder, getU64Encoder, transformEncoder, } from '@solana/codecs'; | ||
import { splDiscriminate } from '@solana/spl-type-length-value'; | ||
@@ -24,3 +24,3 @@ import { SystemProgram, TransactionInstruction } from '@solana/web3.js'; | ||
['updateAuthority', getPublicKeyEncoder()], | ||
['maxSize', getU32Encoder()], | ||
['maxSize', getU64Encoder()], | ||
])).encode({ updateAuthority: updateAuthority ?? SystemProgram.programId, maxSize })), | ||
@@ -37,3 +37,3 @@ }); | ||
], | ||
data: Buffer.from(getInstructionEncoder(splDiscriminate('spl_token_group_interface:update_group_max_size'), getStructEncoder([['maxSize', getU32Encoder()]])).encode({ maxSize })), | ||
data: Buffer.from(getInstructionEncoder(splDiscriminate('spl_token_group_interface:update_group_max_size'), getStructEncoder([['maxSize', getU64Encoder()]])).encode({ maxSize })), | ||
}); | ||
@@ -40,0 +40,0 @@ } |
import { PublicKey } from '@solana/web3.js'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU32Codec } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU64Codec } from '@solana/codecs'; | ||
const tokenGroupCodec = getStructCodec([ | ||
['updateAuthority', fixCodecSize(getBytesCodec(), 32)], | ||
['mint', fixCodecSize(getBytesCodec(), 32)], | ||
['size', getU32Codec()], | ||
['maxSize', getU32Codec()], | ||
['size', getU64Codec()], | ||
['maxSize', getU64Codec()], | ||
]); | ||
@@ -9,0 +9,0 @@ export const TOKEN_GROUP_SIZE = tokenGroupCodec.fixedSize; |
import { PublicKey } from '@solana/web3.js'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU32Codec } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU64Codec } from '@solana/codecs'; | ||
const tokenGroupMemberCodec = getStructCodec([ | ||
['mint', fixCodecSize(getBytesCodec(), 32)], | ||
['group', fixCodecSize(getBytesCodec(), 32)], | ||
['memberNumber', getU32Codec()], | ||
['memberNumber', getU64Codec()], | ||
]); | ||
@@ -8,0 +8,0 @@ export const TOKEN_GROUP_MEMBER_SIZE = tokenGroupMemberCodec.fixedSize; |
@@ -9,3 +9,3 @@ import type { PublicKey } from '@solana/web3.js'; | ||
updateAuthority: PublicKey | null; | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -17,3 +17,3 @@ export declare function createInitializeGroupInstruction(args: InitializeGroupInstruction): TransactionInstruction; | ||
updateAuthority: PublicKey; | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -20,0 +20,0 @@ export declare function createUpdateGroupMaxSizeInstruction(args: UpdateGroupMaxSize): TransactionInstruction; |
@@ -10,5 +10,5 @@ import { PublicKey } from '@solana/web3.js'; | ||
/** The current number of group members */ | ||
size: number; | ||
size: bigint; | ||
/** The maximum number of group members */ | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -15,0 +15,0 @@ export declare function packTokenGroup(group: TokenGroup): ReadonlyUint8Array; |
@@ -10,3 +10,3 @@ import { PublicKey } from '@solana/web3.js'; | ||
/** The member number */ | ||
memberNumber: number; | ||
memberNumber: bigint; | ||
} | ||
@@ -13,0 +13,0 @@ export declare function packTokenGroupMember(member: TokenGroupMember): ReadonlyUint8Array; |
{ | ||
"name": "@solana/spl-token-group", | ||
"description": "SPL Token Group Interface JS API", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>", | ||
@@ -31,28 +31,25 @@ "repository": "https://github.com/solana-labs/solana-program-library", | ||
"peerDependencies": { | ||
"@solana/web3.js": "^1.94.0" | ||
"@solana/web3.js": "^1.95.3" | ||
}, | ||
"dependencies": { | ||
"@solana/codecs": "2.0.0-preview.4", | ||
"@solana/codecs": "2.0.0-rc.1", | ||
"@solana/spl-type-length-value": "0.1.0" | ||
}, | ||
"devDependencies": { | ||
"@solana/web3.js": "^1.94.0", | ||
"@types/chai": "^4.3.16", | ||
"@solana/web3.js": "^1.95.3", | ||
"@types/chai": "^4.3.18", | ||
"@types/mocha": "^10.0.7", | ||
"@types/node": "^20.14.10", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@types/node": "^22.5.0", | ||
"@typescript-eslint/eslint-plugin": "^8.3.0", | ||
"@typescript-eslint/parser": "^8.3.0", | ||
"chai": "^5.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-require-extensions": "^0.1.1", | ||
"gh-pages": "^6.1.1", | ||
"mocha": "^10.6.0", | ||
"prettier": "^3.3.2", | ||
"mocha": "^10.7.3", | ||
"shx": "^0.3.4", | ||
"ts-node": "^10.9.2", | ||
"tslib": "^2.6.3", | ||
"typedoc": "^0.26.3", | ||
"typescript": "^5.5.3" | ||
"tslib": "^2.7.0", | ||
"typedoc": "^0.26.6", | ||
"typescript": "^5.5.4" | ||
}, | ||
@@ -65,5 +62,4 @@ "scripts": { | ||
"docs": "shx rm -rf docs && typedoc && shx cp .nojekyll docs/", | ||
"fmt": "prettier --write '{*,**/*}.{ts,tsx,js,jsx,json}'", | ||
"lint": "prettier --check '{*,**/*}.{ts,tsx,js,jsx,json}' && eslint --max-warnings 0 .", | ||
"lint:fix": "npm run fmt && eslint --fix .", | ||
"lint": "eslint --max-warnings 0 .", | ||
"lint:fix": "eslint --fix .", | ||
"nuke": "shx rm -rf node_modules package-lock.json || true", | ||
@@ -70,0 +66,0 @@ "postbuild": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", |
@@ -8,3 +8,3 @@ import type { Encoder } from '@solana/codecs'; | ||
getTupleEncoder, | ||
getU32Encoder, | ||
getU64Encoder, | ||
transformEncoder, | ||
@@ -32,3 +32,3 @@ } from '@solana/codecs'; | ||
updateAuthority: PublicKey | null; | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -51,5 +51,5 @@ | ||
['updateAuthority', getPublicKeyEncoder()], | ||
['maxSize', getU32Encoder()], | ||
]) | ||
).encode({ updateAuthority: updateAuthority ?? SystemProgram.programId, maxSize }) | ||
['maxSize', getU64Encoder()], | ||
]), | ||
).encode({ updateAuthority: updateAuthority ?? SystemProgram.programId, maxSize }), | ||
), | ||
@@ -63,3 +63,3 @@ }); | ||
updateAuthority: PublicKey; | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -78,4 +78,4 @@ | ||
splDiscriminate('spl_token_group_interface:update_group_max_size'), | ||
getStructEncoder([['maxSize', getU32Encoder()]]) | ||
).encode({ maxSize }) | ||
getStructEncoder([['maxSize', getU64Encoder()]]), | ||
).encode({ maxSize }), | ||
), | ||
@@ -104,4 +104,4 @@ }); | ||
splDiscriminate('spl_token_group_interface:update_authority'), | ||
getStructEncoder([['newAuthority', getPublicKeyEncoder()]]) | ||
).encode({ newAuthority: newAuthority ?? SystemProgram.programId }) | ||
getStructEncoder([['newAuthority', getPublicKeyEncoder()]]), | ||
).encode({ newAuthority: newAuthority ?? SystemProgram.programId }), | ||
), | ||
@@ -135,6 +135,6 @@ }); | ||
splDiscriminate('spl_token_group_interface:initialize_member'), | ||
getStructEncoder([]) | ||
).encode({}) | ||
getStructEncoder([]), | ||
).encode({}), | ||
), | ||
}); | ||
} |
import { PublicKey } from '@solana/web3.js'; | ||
import type { ReadonlyUint8Array } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU32Codec } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU64Codec } from '@solana/codecs'; | ||
@@ -8,4 +8,4 @@ const tokenGroupCodec = getStructCodec([ | ||
['mint', fixCodecSize(getBytesCodec(), 32)], | ||
['size', getU32Codec()], | ||
['maxSize', getU32Codec()], | ||
['size', getU64Codec()], | ||
['maxSize', getU64Codec()], | ||
]); | ||
@@ -21,5 +21,5 @@ | ||
/** The current number of group members */ | ||
size: number; | ||
size: bigint; | ||
/** The maximum number of group members */ | ||
maxSize: number; | ||
maxSize: bigint; | ||
} | ||
@@ -26,0 +26,0 @@ |
import { PublicKey } from '@solana/web3.js'; | ||
import type { ReadonlyUint8Array } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU32Codec } from '@solana/codecs'; | ||
import { fixCodecSize, getBytesCodec, getStructCodec, getU64Codec } from '@solana/codecs'; | ||
@@ -8,3 +8,3 @@ const tokenGroupMemberCodec = getStructCodec([ | ||
['group', fixCodecSize(getBytesCodec(), 32)], | ||
['memberNumber', getU32Codec()], | ||
['memberNumber', getU64Codec()], | ||
]); | ||
@@ -20,3 +20,3 @@ | ||
/** The member number */ | ||
memberNumber: number; | ||
memberNumber: bigint; | ||
} | ||
@@ -23,0 +23,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16
64049
+ Added@solana/codecs@2.0.0-rc.1(transitive)
+ Added@solana/codecs-core@2.0.0-rc.1(transitive)
+ Added@solana/codecs-data-structures@2.0.0-rc.1(transitive)
+ Added@solana/codecs-numbers@2.0.0-rc.1(transitive)
+ Added@solana/codecs-strings@2.0.0-rc.1(transitive)
+ Added@solana/errors@2.0.0-rc.1(transitive)
+ Added@solana/options@2.0.0-rc.1(transitive)
- Removed@solana/codecs@2.0.0-preview.4(transitive)
- Removed@solana/codecs-core@2.0.0-preview.4(transitive)
- Removed@solana/codecs-data-structures@2.0.0-preview.4(transitive)
- Removed@solana/codecs-numbers@2.0.0-preview.4(transitive)
- Removed@solana/codecs-strings@2.0.0-preview.4(transitive)
- Removed@solana/errors@2.0.0-preview.4(transitive)
- Removed@solana/options@2.0.0-preview.4(transitive)
Updated@solana/codecs@2.0.0-rc.1