@lightprotocol/stateless.js 0.17.1 → 0.17.2-alpha.1
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 +8 -0
- package/dist/cjs/browser/actions/compress.d.ts +1 -1
- package/dist/cjs/browser/actions/create-account.d.ts +1 -1
- package/dist/cjs/browser/actions/decompress.d.ts +1 -1
- package/dist/cjs/browser/actions/transfer.d.ts +1 -1
- package/dist/cjs/browser/constants.d.ts +1 -1
- package/dist/cjs/browser/index.cjs +1 -12991
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/index.d.ts +0 -2
- package/dist/cjs/browser/programs/index.d.ts +1 -0
- package/dist/cjs/browser/programs/layout.d.ts +25 -0
- package/dist/cjs/browser/programs/system.d.ts +1 -8
- package/dist/cjs/browser/rpc-interface.d.ts +167 -160
- package/dist/cjs/browser/rpc.d.ts +4 -2
- package/dist/cjs/browser/state/BN254.d.ts +1 -1
- package/dist/cjs/browser/state/compressed-account.d.ts +1 -1
- package/dist/cjs/browser/state/types.d.ts +1 -25
- package/dist/cjs/browser/test-helpers/merkle-tree/indexed-array.d.ts +1 -1
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -1
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -1
- package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +2 -1
- package/dist/cjs/browser/utils/conversion.d.ts +1 -1
- package/dist/cjs/browser/utils/validation.d.ts +1 -1
- package/dist/cjs/node/actions/compress.d.ts +1 -1
- package/dist/cjs/node/actions/create-account.d.ts +1 -1
- package/dist/cjs/node/actions/decompress.d.ts +1 -1
- package/dist/cjs/node/actions/transfer.d.ts +1 -1
- package/dist/cjs/node/constants.d.ts +1 -1
- package/dist/cjs/node/index.cjs +1 -10036
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/index.d.ts +0 -2
- package/dist/cjs/node/programs/index.d.ts +1 -0
- package/dist/cjs/node/programs/layout.d.ts +25 -0
- package/dist/cjs/node/programs/system.d.ts +1 -8
- package/dist/cjs/node/rpc-interface.d.ts +167 -160
- package/dist/cjs/node/rpc.d.ts +4 -2
- package/dist/cjs/node/state/BN254.d.ts +1 -1
- package/dist/cjs/node/state/compressed-account.d.ts +1 -1
- package/dist/cjs/node/state/types.d.ts +1 -25
- package/dist/cjs/node/test-helpers/merkle-tree/indexed-array.d.ts +1 -1
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -1
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -1
- package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +2 -1
- package/dist/cjs/node/utils/conversion.d.ts +1 -1
- package/dist/cjs/node/utils/validation.d.ts +1 -1
- package/dist/es/browser/actions/compress.d.ts +1 -1
- package/dist/es/browser/actions/create-account.d.ts +1 -1
- package/dist/es/browser/actions/decompress.d.ts +1 -1
- package/dist/es/browser/actions/transfer.d.ts +1 -1
- package/dist/es/browser/constants.d.ts +1 -1
- package/dist/es/browser/index.d.ts +0 -2
- package/dist/es/browser/index.js +1 -12911
- package/dist/es/browser/index.js.map +1 -1
- package/dist/es/browser/programs/index.d.ts +1 -0
- package/dist/es/browser/programs/layout.d.ts +25 -0
- package/dist/es/browser/programs/system.d.ts +1 -8
- package/dist/es/browser/rpc-interface.d.ts +167 -160
- package/dist/es/browser/rpc.d.ts +4 -2
- package/dist/es/browser/state/BN254.d.ts +1 -1
- package/dist/es/browser/state/compressed-account.d.ts +1 -1
- package/dist/es/browser/state/types.d.ts +1 -25
- package/dist/es/browser/test-helpers/merkle-tree/indexed-array.d.ts +1 -1
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +1 -1
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -1
- package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +2 -1
- package/dist/es/browser/utils/conversion.d.ts +1 -1
- package/dist/es/browser/utils/validation.d.ts +1 -1
- package/dist/types/index.d.ts +1073 -6401
- package/package.json +17 -10
- package/dist/cjs/browser/idls/account_compression.d.ts +0 -1170
- package/dist/cjs/browser/idls/index.d.ts +0 -5
- package/dist/cjs/browser/idls/light_compressed_token.d.ts +0 -1792
- package/dist/cjs/browser/idls/light_registry.d.ts +0 -1293
- package/dist/cjs/browser/idls/light_system_program.d.ts +0 -1065
- package/dist/cjs/browser/wallet/index.d.ts +0 -1
- package/dist/cjs/browser/wallet/interface.d.ts +0 -25
- package/dist/cjs/browser/wallet/use-wallet.d.ts +0 -9
- package/dist/cjs/node/idls/account_compression.d.ts +0 -1170
- package/dist/cjs/node/idls/index.d.ts +0 -5
- package/dist/cjs/node/idls/light_compressed_token.d.ts +0 -1792
- package/dist/cjs/node/idls/light_registry.d.ts +0 -1293
- package/dist/cjs/node/idls/light_system_program.d.ts +0 -1065
- package/dist/cjs/node/wallet/index.d.ts +0 -1
- package/dist/cjs/node/wallet/interface.d.ts +0 -25
- package/dist/cjs/node/wallet/use-wallet.d.ts +0 -9
- package/dist/es/browser/idls/account_compression.d.ts +0 -1170
- package/dist/es/browser/idls/index.d.ts +0 -5
- package/dist/es/browser/idls/light_compressed_token.d.ts +0 -1792
- package/dist/es/browser/idls/light_registry.d.ts +0 -1293
- package/dist/es/browser/idls/light_system_program.d.ts +0 -1065
- package/dist/es/browser/wallet/index.d.ts +0 -1
- package/dist/es/browser/wallet/interface.d.ts +0 -25
- package/dist/es/browser/wallet/use-wallet.d.ts +0 -9
package/dist/cjs/node/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export * from './actions';
|
|
2
|
-
export * from './idls';
|
|
3
2
|
export * from './instruction';
|
|
4
3
|
export * from './programs';
|
|
5
4
|
export * from './state';
|
|
6
5
|
export * from './utils';
|
|
7
|
-
export * from './wallet';
|
|
8
6
|
export * from './constants';
|
|
9
7
|
export * from './errors';
|
|
10
8
|
export * from './rpc-interface';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Buffer } from 'buffer';
|
|
2
|
+
import { PublicKey, AccountMeta } from '@solana/web3.js';
|
|
3
|
+
import { Layout } from '@coral-xyz/borsh';
|
|
4
|
+
import { InstructionDataInvoke, PublicTransactionEvent } from '../state';
|
|
5
|
+
export declare const CompressedAccountLayout: import("buffer-layout").Layout<unknown>;
|
|
6
|
+
export declare const MerkleContextLayout: import("buffer-layout").Layout<unknown>;
|
|
7
|
+
export declare const NewAddressParamsLayout: import("buffer-layout").Layout<unknown>;
|
|
8
|
+
export declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
9
|
+
export declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer;
|
|
10
|
+
export declare function decodeInstructionDataInvoke(buffer: Buffer): InstructionDataInvoke;
|
|
11
|
+
export type invokeAccountsLayoutParams = {
|
|
12
|
+
feePayer: PublicKey;
|
|
13
|
+
authority: PublicKey;
|
|
14
|
+
registeredProgramPda: PublicKey;
|
|
15
|
+
noopProgram: PublicKey;
|
|
16
|
+
accountCompressionAuthority: PublicKey;
|
|
17
|
+
accountCompressionProgram: PublicKey;
|
|
18
|
+
solPoolPda: PublicKey | null;
|
|
19
|
+
decompressionRecipient: PublicKey | null;
|
|
20
|
+
systemProgram: PublicKey;
|
|
21
|
+
};
|
|
22
|
+
export declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => AccountMeta[];
|
|
23
|
+
export declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
24
|
+
export declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer;
|
|
25
|
+
export declare function decodePublicTransactionEvent(buffer: Buffer): PublicTransactionEvent;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BN from 'bn.js';
|
|
2
2
|
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
3
|
-
import { LightSystemProgram as LightSystemProgramIDL } from '../idls/light_system_program';
|
|
4
3
|
import { CompressedAccount, CompressedAccountWithMerkleContext, CompressedProof } from '../state';
|
|
5
4
|
import { NewAddressParams } from '../utils';
|
|
6
5
|
export declare const sumUpLamports: (accounts: CompressedAccountWithMerkleContext[]) => BN;
|
|
@@ -154,18 +153,12 @@ export declare class LightSystemProgram {
|
|
|
154
153
|
* Public key that identifies the CompressedPda program
|
|
155
154
|
*/
|
|
156
155
|
static programId: PublicKey;
|
|
157
|
-
private static _program;
|
|
158
|
-
static get program(): Program<LightSystemProgramIDL>;
|
|
159
156
|
/**
|
|
160
157
|
* @internal
|
|
161
158
|
* Cwct1kQLwJm8Z3HetLu8m4SXkhD6FZ5fXbJQCxTxPnGY
|
|
162
159
|
*
|
|
163
160
|
*/
|
|
164
161
|
static deriveCompressedSolPda(): PublicKey;
|
|
165
|
-
/**
|
|
166
|
-
* Initializes the program statically if not already initialized.
|
|
167
|
-
*/
|
|
168
|
-
private static initializeProgram;
|
|
169
162
|
static createTransferOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], toAddress: PublicKey, lamports: number | BN): CompressedAccount[];
|
|
170
163
|
static createDecompressOutputState(inputCompressedAccounts: CompressedAccountWithMerkleContext[], lamports: number | BN): CompressedAccount[];
|
|
171
164
|
/**
|