@lightprotocol/stateless.js 0.15.0 → 0.15.2
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 +5 -21
- package/dist/cjs/browser/index.cjs +104 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +104 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/es/browser/index.js +104 -1
- package/dist/es/browser/index.js.map +1 -1
- package/dist/types/index.d.ts +103 -0
- package/package.json +1 -1
package/dist/cjs/node/index.cjs
CHANGED
|
@@ -8308,6 +8308,106 @@ const IDL = {
|
|
|
8308
8308
|
},
|
|
8309
8309
|
],
|
|
8310
8310
|
},
|
|
8311
|
+
{
|
|
8312
|
+
name: 'compressSplTokenAccount',
|
|
8313
|
+
accounts: [
|
|
8314
|
+
{
|
|
8315
|
+
name: 'feePayer',
|
|
8316
|
+
isMut: true,
|
|
8317
|
+
isSigner: true,
|
|
8318
|
+
docs: ['UNCHECKED: only pays fees.'],
|
|
8319
|
+
},
|
|
8320
|
+
{
|
|
8321
|
+
name: 'authority',
|
|
8322
|
+
isMut: false,
|
|
8323
|
+
isSigner: true,
|
|
8324
|
+
docs: [
|
|
8325
|
+
'Authority is verified through proof since both owner and delegate',
|
|
8326
|
+
'are included in the token data hash, which is a public input to the',
|
|
8327
|
+
'validity proof.',
|
|
8328
|
+
],
|
|
8329
|
+
},
|
|
8330
|
+
{
|
|
8331
|
+
name: 'cpiAuthorityPda',
|
|
8332
|
+
isMut: false,
|
|
8333
|
+
isSigner: false,
|
|
8334
|
+
},
|
|
8335
|
+
{
|
|
8336
|
+
name: 'lightSystemProgram',
|
|
8337
|
+
isMut: false,
|
|
8338
|
+
isSigner: false,
|
|
8339
|
+
},
|
|
8340
|
+
{
|
|
8341
|
+
name: 'registeredProgramPda',
|
|
8342
|
+
isMut: false,
|
|
8343
|
+
isSigner: false,
|
|
8344
|
+
},
|
|
8345
|
+
{
|
|
8346
|
+
name: 'noopProgram',
|
|
8347
|
+
isMut: false,
|
|
8348
|
+
isSigner: false,
|
|
8349
|
+
},
|
|
8350
|
+
{
|
|
8351
|
+
name: 'accountCompressionAuthority',
|
|
8352
|
+
isMut: false,
|
|
8353
|
+
isSigner: false,
|
|
8354
|
+
},
|
|
8355
|
+
{
|
|
8356
|
+
name: 'accountCompressionProgram',
|
|
8357
|
+
isMut: false,
|
|
8358
|
+
isSigner: false,
|
|
8359
|
+
},
|
|
8360
|
+
{
|
|
8361
|
+
name: 'selfProgram',
|
|
8362
|
+
isMut: false,
|
|
8363
|
+
isSigner: false,
|
|
8364
|
+
docs: ['this program is the signer of the cpi.'],
|
|
8365
|
+
},
|
|
8366
|
+
{
|
|
8367
|
+
name: 'tokenPoolPda',
|
|
8368
|
+
isMut: true,
|
|
8369
|
+
isSigner: false,
|
|
8370
|
+
isOptional: true,
|
|
8371
|
+
},
|
|
8372
|
+
{
|
|
8373
|
+
name: 'compressOrDecompressTokenAccount',
|
|
8374
|
+
isMut: true,
|
|
8375
|
+
isSigner: false,
|
|
8376
|
+
isOptional: true,
|
|
8377
|
+
},
|
|
8378
|
+
{
|
|
8379
|
+
name: 'tokenProgram',
|
|
8380
|
+
isMut: false,
|
|
8381
|
+
isSigner: false,
|
|
8382
|
+
isOptional: true,
|
|
8383
|
+
},
|
|
8384
|
+
{
|
|
8385
|
+
name: 'systemProgram',
|
|
8386
|
+
isMut: false,
|
|
8387
|
+
isSigner: false,
|
|
8388
|
+
},
|
|
8389
|
+
],
|
|
8390
|
+
args: [
|
|
8391
|
+
{
|
|
8392
|
+
name: 'owner',
|
|
8393
|
+
type: 'publicKey',
|
|
8394
|
+
},
|
|
8395
|
+
{
|
|
8396
|
+
name: 'remainingAmount',
|
|
8397
|
+
type: {
|
|
8398
|
+
option: 'u64',
|
|
8399
|
+
},
|
|
8400
|
+
},
|
|
8401
|
+
{
|
|
8402
|
+
name: 'cpiContext',
|
|
8403
|
+
type: {
|
|
8404
|
+
option: {
|
|
8405
|
+
defined: 'CompressedCpiContext',
|
|
8406
|
+
},
|
|
8407
|
+
},
|
|
8408
|
+
},
|
|
8409
|
+
],
|
|
8410
|
+
},
|
|
8311
8411
|
{
|
|
8312
8412
|
name: 'transfer',
|
|
8313
8413
|
docs: [
|
|
@@ -10585,7 +10685,7 @@ async function getCompressedTokenAccountsByOwnerOrDelegate(rpc, ownerOrDelegate,
|
|
|
10585
10685
|
var _a;
|
|
10586
10686
|
const _account = item.account;
|
|
10587
10687
|
const _tokenData = item.tokenData;
|
|
10588
|
-
const compressedAccount = createCompressedAccountWithMerkleContext(createMerkleContext(_account.tree, mockNullifierQueue, _account.hash.toArray('be', 32), _account.leafIndex),
|
|
10688
|
+
const compressedAccount = createCompressedAccountWithMerkleContext(createMerkleContext(_account.tree, mockNullifierQueue, _account.hash.toArray('be', 32), _account.leafIndex), _account.owner, bn(_account.lamports), _account.data ? parseAccountData(_account.data) : undefined, _account.address || undefined);
|
|
10589
10689
|
const parsed = {
|
|
10590
10690
|
mint: _tokenData.mint,
|
|
10591
10691
|
owner: _tokenData.owner,
|
|
@@ -11194,6 +11294,9 @@ class Rpc extends web3_js.Connection {
|
|
|
11194
11294
|
}
|
|
11195
11295
|
return res.result;
|
|
11196
11296
|
}
|
|
11297
|
+
/**
|
|
11298
|
+
* Fetch all the compressed token holders for a given mint. Paginated.
|
|
11299
|
+
*/
|
|
11197
11300
|
async getCompressedMintTokenHolders(mint, options) {
|
|
11198
11301
|
var _a;
|
|
11199
11302
|
const unsafeRes = await rpcRequest(this.compressionApiEndpoint, 'getCompressedMintTokenHolders', {
|