@smithii_io/mixoor 0.0.2 → 0.0.4
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/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +8 -1
- package/dist/src/index.mjs.map +1 -1
- package/dist/test/_constants.js +17 -0
- package/dist/test/_constants.js.map +1 -0
- package/dist/test/_create.test.js +37 -0
- package/dist/test/_create.test.js.map +1 -0
- package/dist/test/_deposit.test.js +62 -0
- package/dist/test/_deposit.test.js.map +1 -0
- package/dist/test/_helpers.js +15 -0
- package/dist/test/_helpers.js.map +1 -0
- package/dist/test/_setup.js +197 -0
- package/dist/test/_setup.js.map +1 -0
- package/dist/test/transfer.test.js +97 -0
- package/dist/test/transfer.test.js.map +1 -0
- package/dist/types/src/utils/pda.d.ts +11 -2
- package/dist/types/src/utils/pda.d.ts.map +1 -1
- package/package.json +4 -5
package/dist/src/index.mjs
CHANGED
|
@@ -1357,7 +1357,14 @@ async function findVaultAddress(seeds, config = {}) {
|
|
|
1357
1357
|
seeds: ["vault", getAddressEncoder().encode(seeds.pool)]
|
|
1358
1358
|
});
|
|
1359
1359
|
}
|
|
1360
|
+
async function findNullifierAddress(seeds, config = {}) {
|
|
1361
|
+
const { programAddress = MIXOOR_PROGRAM_ADDRESS } = config;
|
|
1362
|
+
return await getProgramDerivedAddress({
|
|
1363
|
+
programAddress,
|
|
1364
|
+
seeds: ["nullifier", seeds.nullifierHash]
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1360
1367
|
|
|
1361
|
-
export { AssetType, DEPOSIT_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, MIXOOR_ERROR__INSUFFICIENT_FUNDS, MIXOOR_ERROR__INVALID_AMOUNT, MIXOOR_ERROR__INVALID_ASSET_TYPE, MIXOOR_ERROR__INVALID_MERKLE_PROOF, MIXOOR_ERROR__INVALID_MERKLE_TREE, MIXOOR_ERROR__INVALID_MERKLE_TREE_ADDRESS, MIXOOR_ERROR__INVALID_PROOF, MIXOOR_ERROR__INVALID_PUBLIC_INPUTS, MIXOOR_ERROR__MERKLE_TREE_FULL, MIXOOR_ERROR__MISSING_TOKEN_ACCOUNT, MIXOOR_ERROR__OVERFLOW, MIXOOR_ERROR__POSEIDON_HASH_ERROR, MIXOOR_ERROR__UNKNOWN_ROOT, MIXOOR_PROGRAM_ADDRESS, MerkleTree, MixoorAccount, MixoorInstruction, NULLIFIER_ACCOUNT_DISCRIMINATOR, POOL_DISCRIMINATOR, TRANSFER_DISCRIMINATOR, VAULT_DISCRIMINATOR, decodeNullifierAccount, decodePool, decodeVault, extractMerkleRootFromAccount, fetchAllMaybeNullifierAccount, fetchAllMaybePool, fetchAllMaybeVault, fetchAllNullifierAccount, fetchAllPool, fetchAllVault, fetchMaybeNullifierAccount, fetchMaybePool, fetchMaybeVault, fetchNullifierAccount, fetchPool, fetchVault, findMerkleTreeAddress, findPoolAddress, findVaultAddress, fromHex, generateCommitment, generateNullifier, generateProof, getAssetTypeCodec, getAssetTypeDecoder, getAssetTypeEncoder, getCommitmentInsertedCodec, getCommitmentInsertedDecoder, getCommitmentInsertedEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionAsync, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getMixoorErrorMessage, getNullifierAccountCodec, getNullifierAccountDecoder, getNullifierAccountDiscriminatorBytes, getNullifierAccountEncoder, getNullifierAccountSize, getPoolCodec, getPoolDecoder, getPoolDiscriminatorBytes, getPoolEncoder, getPoolSize, getRootEntryCodec, getRootEntryDecoder, getRootEntryEncoder, getTransferDiscriminatorBytes, getTransferInstruction, getTransferInstructionAsync, getTransferInstructionDataCodec, getTransferInstructionDataDecoder, getTransferInstructionDataEncoder, getVaultCodec, getVaultDecoder, getVaultDiscriminatorBytes, getVaultEncoder, getVaultSize, identifyMixoorAccount, identifyMixoorInstruction, isMixoorError, parseDepositInstruction, parseInitializePoolInstruction, parseTransferInstruction, poseidonHash, randomBytes, toHex };
|
|
1368
|
+
export { AssetType, DEPOSIT_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, MIXOOR_ERROR__INSUFFICIENT_FUNDS, MIXOOR_ERROR__INVALID_AMOUNT, MIXOOR_ERROR__INVALID_ASSET_TYPE, MIXOOR_ERROR__INVALID_MERKLE_PROOF, MIXOOR_ERROR__INVALID_MERKLE_TREE, MIXOOR_ERROR__INVALID_MERKLE_TREE_ADDRESS, MIXOOR_ERROR__INVALID_PROOF, MIXOOR_ERROR__INVALID_PUBLIC_INPUTS, MIXOOR_ERROR__MERKLE_TREE_FULL, MIXOOR_ERROR__MISSING_TOKEN_ACCOUNT, MIXOOR_ERROR__OVERFLOW, MIXOOR_ERROR__POSEIDON_HASH_ERROR, MIXOOR_ERROR__UNKNOWN_ROOT, MIXOOR_PROGRAM_ADDRESS, MerkleTree, MixoorAccount, MixoorInstruction, NULLIFIER_ACCOUNT_DISCRIMINATOR, POOL_DISCRIMINATOR, TRANSFER_DISCRIMINATOR, VAULT_DISCRIMINATOR, decodeNullifierAccount, decodePool, decodeVault, extractMerkleRootFromAccount, fetchAllMaybeNullifierAccount, fetchAllMaybePool, fetchAllMaybeVault, fetchAllNullifierAccount, fetchAllPool, fetchAllVault, fetchMaybeNullifierAccount, fetchMaybePool, fetchMaybeVault, fetchNullifierAccount, fetchPool, fetchVault, findMerkleTreeAddress, findNullifierAddress, findPoolAddress, findVaultAddress, fromHex, generateCommitment, generateNullifier, generateProof, getAssetTypeCodec, getAssetTypeDecoder, getAssetTypeEncoder, getCommitmentInsertedCodec, getCommitmentInsertedDecoder, getCommitmentInsertedEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionAsync, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getMixoorErrorMessage, getNullifierAccountCodec, getNullifierAccountDecoder, getNullifierAccountDiscriminatorBytes, getNullifierAccountEncoder, getNullifierAccountSize, getPoolCodec, getPoolDecoder, getPoolDiscriminatorBytes, getPoolEncoder, getPoolSize, getRootEntryCodec, getRootEntryDecoder, getRootEntryEncoder, getTransferDiscriminatorBytes, getTransferInstruction, getTransferInstructionAsync, getTransferInstructionDataCodec, getTransferInstructionDataDecoder, getTransferInstructionDataEncoder, getVaultCodec, getVaultDecoder, getVaultDiscriminatorBytes, getVaultEncoder, getVaultSize, identifyMixoorAccount, identifyMixoorInstruction, isMixoorError, parseDepositInstruction, parseInitializePoolInstruction, parseTransferInstruction, poseidonHash, randomBytes, toHex };
|
|
1362
1369
|
//# sourceMappingURL=index.mjs.map
|
|
1363
1370
|
//# sourceMappingURL=index.mjs.map
|