@bonfida/spl-name-service 3.0.20 → 3.0.21
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 +2 -2
- package/dist/cjs/bindings/burnDomain.js.map +1 -1
- package/dist/cjs/bindings/createNameRegistry.js.map +1 -1
- package/dist/cjs/bindings/createRecordInstruction.js.map +1 -1
- package/dist/cjs/bindings/createRecordV2Instruction.js.map +1 -1
- package/dist/cjs/bindings/createReverseName.js.map +1 -1
- package/dist/cjs/bindings/createSolRecordInstruction.js.map +1 -1
- package/dist/cjs/bindings/createSubdomain.js.map +1 -1
- package/dist/cjs/bindings/deleteNameRegistry.js.map +1 -1
- package/dist/cjs/bindings/deleteRecordV2.js.map +1 -1
- package/dist/cjs/bindings/ethValidateRecordV2Content.js.map +1 -1
- package/dist/cjs/bindings/registerDomainName.js +1 -1
- package/dist/cjs/bindings/registerDomainName.js.map +1 -1
- package/dist/cjs/bindings/registerDomainNameV2.js +1 -1
- package/dist/cjs/bindings/registerDomainNameV2.js.map +1 -1
- package/dist/cjs/bindings/registerFavorite.js.map +1 -1
- package/dist/cjs/bindings/registerWithNft.js.map +1 -1
- package/dist/cjs/bindings/transferNameOwnership.js.map +1 -1
- package/dist/cjs/bindings/transferSubdomain.js.map +1 -1
- package/dist/cjs/bindings/updateNameRegistryData.js.map +1 -1
- package/dist/cjs/bindings/updateRecordInstruction.js.map +1 -1
- package/dist/cjs/bindings/updateRecordV2Instruction.js.map +1 -1
- package/dist/cjs/bindings/updateSolRecordInstruction.js.map +1 -1
- package/dist/cjs/bindings/validateRecordV2Content.js.map +1 -1
- package/dist/cjs/bindings/writRoaRecordV2.js.map +1 -1
- package/dist/cjs/custom-bg.js.map +1 -1
- package/dist/cjs/deprecated/utils.js +1 -1
- package/dist/cjs/deprecated/utils.js.map +1 -1
- package/dist/cjs/devnet.js +1 -1
- package/dist/cjs/devnet.js.map +1 -1
- package/dist/cjs/error.js.map +1 -1
- package/dist/cjs/favorite-domain.js +1 -1
- package/dist/cjs/favorite-domain.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/instructions/burnInstruction.js.map +1 -1
- package/dist/cjs/instructions/createInstruction.js.map +1 -1
- package/dist/cjs/instructions/createInstructionV3.js.map +1 -1
- package/dist/cjs/instructions/createReverseInstruction.js.map +1 -1
- package/dist/cjs/instructions/createSplitV2Instruction.js.map +1 -1
- package/dist/cjs/instructions/createV2Instruction.js.map +1 -1
- package/dist/cjs/instructions/createWithNftInstruction.js.map +1 -1
- package/dist/cjs/instructions/reallocInstruction.js.map +1 -1
- package/dist/cjs/instructions/registerFavoriteInstruction.js.map +1 -1
- package/dist/cjs/instructions/transferInstruction.js.map +1 -1
- package/dist/cjs/instructions/updateInstruction.js.map +1 -1
- package/dist/cjs/int.js.map +1 -1
- package/dist/cjs/nft/getDomainMint.js.map +1 -1
- package/dist/cjs/nft/getRecordFromMint.js.map +1 -1
- package/dist/cjs/nft/retrieveNftOwner.js.map +1 -1
- package/dist/cjs/nft/retrieveNftOwnerV2.js.map +1 -1
- package/dist/cjs/nft/retrieveNfts.js +1 -1
- package/dist/cjs/nft/retrieveNfts.js.map +1 -1
- package/dist/cjs/nft/retrieveRecords.js +1 -1
- package/dist/cjs/nft/retrieveRecords.js.map +1 -1
- package/dist/cjs/nft/state.js.map +1 -1
- package/dist/cjs/node_modules/@bonfida/sns-records/dist/index.js +1 -1
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/curve.js +2 -2
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -1
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/edwards.js +2 -2
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -1
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/modular.js +2 -2
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -1
- package/dist/cjs/node_modules/@noble/curves/esm/ed25519.js +2 -2
- package/dist/cjs/node_modules/@noble/curves/esm/ed25519.js.map +1 -1
- package/dist/cjs/node_modules/@noble/curves/esm/utils.js +3 -0
- package/dist/cjs/node_modules/@noble/curves/esm/utils.js.map +1 -0
- package/dist/cjs/node_modules/@noble/hashes/esm/_md.js +1 -1
- package/dist/cjs/node_modules/@noble/hashes/esm/_md.js.map +1 -1
- package/dist/cjs/node_modules/@noble/hashes/esm/sha2.js +1 -1
- package/dist/cjs/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
- package/dist/cjs/node_modules/@noble/hashes/esm/utils.js +2 -2
- package/dist/cjs/node_modules/@noble/hashes/esm/utils.js.map +1 -1
- package/dist/cjs/node_modules/@scure/base/lib/esm/index.js +1 -1
- package/dist/cjs/node_modules/@scure/base/lib/esm/index.js.map +1 -1
- package/dist/cjs/node_modules/@solana/spl-token/lib/esm/extensions/accountType.js.map +1 -1
- package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/account.js.map +1 -1
- package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/mint.js.map +1 -1
- package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/multisig.js.map +1 -1
- package/dist/cjs/node_modules/base64-js/index.js +1 -1
- package/dist/cjs/node_modules/base64-js/index.js.map +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/buffer.js.map +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/deserialize.js +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/deserialize.js.map +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/index.js.map +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/serialize.js.map +1 -1
- package/dist/cjs/node_modules/borsh/lib/esm/utils.js.map +1 -1
- package/dist/cjs/node_modules/bs58/index.js.map +1 -1
- package/dist/cjs/node_modules/bs58/node_modules/base-x/src/index.js.map +1 -1
- package/dist/cjs/node_modules/buffer/index.js +1 -1
- package/dist/cjs/node_modules/buffer/index.js.map +1 -1
- package/dist/cjs/node_modules/graphemesplit/index.js.map +1 -1
- package/dist/cjs/node_modules/ieee754/index.js.map +1 -1
- package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.js +1 -1
- package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.js.map +1 -1
- package/dist/cjs/node_modules/js-base64/base64.js +1 -1
- package/dist/cjs/node_modules/js-base64/base64.js.map +1 -1
- package/dist/cjs/node_modules/punycode/punycode.es6.js +1 -1
- package/dist/cjs/node_modules/punycode/punycode.es6.js.map +1 -1
- package/dist/cjs/node_modules/tiny-inflate/index.js.map +1 -1
- package/dist/cjs/node_modules/unicode-trie/index.js.map +1 -1
- package/dist/cjs/node_modules/unicode-trie/swap.js.map +1 -1
- package/dist/cjs/record/deserializeRecord.js +1 -1
- package/dist/cjs/record/deserializeRecord.js.map +1 -1
- package/dist/cjs/record/getRecord.js.map +1 -1
- package/dist/cjs/record/getRecordKeySync.js.map +1 -1
- package/dist/cjs/record/getRecords.js +1 -1
- package/dist/cjs/record/getRecords.js.map +1 -1
- package/dist/cjs/record/helpers/getSolRecord.js.map +1 -1
- package/dist/cjs/record/serializeRecord.js.map +1 -1
- package/dist/cjs/record/serializeSolRecord.js.map +1 -1
- package/dist/cjs/record_v2/const.d.ts +1 -0
- package/dist/cjs/record_v2/const.js +1 -1
- package/dist/cjs/record_v2/const.js.map +1 -1
- package/dist/cjs/record_v2/deserializeRecordV2Content.js.map +1 -1
- package/dist/cjs/record_v2/getMultipleRecordsV2.d.ts +16 -5
- package/dist/cjs/record_v2/getMultipleRecordsV2.js +1 -1
- package/dist/cjs/record_v2/getMultipleRecordsV2.js.map +1 -1
- package/dist/cjs/record_v2/getRecordV2.d.ts +16 -8
- package/dist/cjs/record_v2/getRecordV2.js +1 -1
- package/dist/cjs/record_v2/getRecordV2.js.map +1 -1
- package/dist/cjs/record_v2/getRecordV2Key.js.map +1 -1
- package/dist/cjs/record_v2/serializeRecordV2Content.js.map +1 -1
- package/dist/cjs/record_v2/verifyRightOfAssociation.js.map +1 -1
- package/dist/cjs/record_v2/{utils.js → verifyStaleness.js} +1 -1
- package/dist/cjs/record_v2/verifyStaleness.js.map +1 -0
- package/dist/cjs/resolve/resolve.js +1 -1
- package/dist/cjs/resolve/resolve.js.map +1 -1
- package/dist/cjs/resolve/resolveSolRecordV1.js.map +1 -1
- package/dist/cjs/resolve/resolveSolRecordV2.js.map +1 -1
- package/dist/cjs/state.js +1 -1
- package/dist/cjs/state.js.map +1 -1
- package/dist/cjs/twitter/ReverseTwitterRegistryState.js.map +1 -1
- package/dist/cjs/twitter/changeTwitterRegistryData.js.map +1 -1
- package/dist/cjs/twitter/changeVerifiedPubkey.js.map +1 -1
- package/dist/cjs/twitter/createReverseTwitterRegistry.js.map +1 -1
- package/dist/cjs/twitter/createVerifiedTwitterRegistry.js.map +1 -1
- package/dist/cjs/twitter/deleteTwitterRegistry.js.map +1 -1
- package/dist/cjs/twitter/getHandleAndRegistryKey.js.map +1 -1
- package/dist/cjs/twitter/getTwitterHandleandRegistryKeyViaFilters.js.map +1 -1
- package/dist/cjs/twitter/getTwitterRegistry.js.map +1 -1
- package/dist/cjs/twitter/getTwitterRegistryData.js.map +1 -1
- package/dist/cjs/twitter/getTwitterRegistryKey.js.map +1 -1
- package/dist/cjs/types/custom-bg.js.map +1 -1
- package/dist/cjs/types/record.js.map +1 -1
- package/dist/cjs/utils/findSubdomains.js +1 -1
- package/dist/cjs/utils/findSubdomains.js.map +1 -1
- package/dist/cjs/utils/getAllDomains.js +1 -1
- package/dist/cjs/utils/getAllDomains.js.map +1 -1
- package/dist/cjs/utils/getAllRegisteredDomains.js.map +1 -1
- package/dist/cjs/utils/getDomainKeySync.js.map +1 -1
- package/dist/cjs/utils/getDomainKeysWithReverses.js +1 -1
- package/dist/cjs/utils/getDomainKeysWithReverses.js.map +1 -1
- package/dist/cjs/utils/getDomainPriceFromName.js.map +1 -1
- package/dist/cjs/utils/getHashedNameSync.js.map +1 -1
- package/dist/cjs/utils/getNameAccountKeySync.js.map +1 -1
- package/dist/cjs/utils/getPythFeedAccountKey.js.map +1 -1
- package/dist/cjs/utils/getReverseKeyFromDomainKey.js.map +1 -1
- package/dist/cjs/utils/getReverseKeySync.js.map +1 -1
- package/dist/cjs/utils/getTokenizedDomains.js +1 -1
- package/dist/cjs/utils/getTokenizedDomains.js.map +1 -1
- package/dist/cjs/utils/reverseLookup.js.map +1 -1
- package/dist/cjs/utils/reverseLookupBatch.js +1 -1
- package/dist/cjs/utils/reverseLookupBatch.js.map +1 -1
- package/dist/esm/bindings/burnDomain.js.map +1 -1
- package/dist/esm/bindings/createNameRegistry.js.map +1 -1
- package/dist/esm/bindings/createRecordInstruction.js.map +1 -1
- package/dist/esm/bindings/createRecordV2Instruction.js.map +1 -1
- package/dist/esm/bindings/createReverseName.js.map +1 -1
- package/dist/esm/bindings/createSolRecordInstruction.js.map +1 -1
- package/dist/esm/bindings/createSubdomain.js.map +1 -1
- package/dist/esm/bindings/deleteRecordV2.js.map +1 -1
- package/dist/esm/bindings/ethValidateRecordV2Content.js.map +1 -1
- package/dist/esm/bindings/registerDomainName.js +1 -1
- package/dist/esm/bindings/registerDomainName.js.map +1 -1
- package/dist/esm/bindings/registerDomainNameV2.js +1 -1
- package/dist/esm/bindings/registerDomainNameV2.js.map +1 -1
- package/dist/esm/bindings/registerFavorite.js.map +1 -1
- package/dist/esm/bindings/registerWithNft.js.map +1 -1
- package/dist/esm/bindings/transferSubdomain.js.map +1 -1
- package/dist/esm/bindings/updateRecordInstruction.js.map +1 -1
- package/dist/esm/bindings/updateRecordV2Instruction.js.map +1 -1
- package/dist/esm/bindings/updateSolRecordInstruction.js.map +1 -1
- package/dist/esm/bindings/validateRecordV2Content.js.map +1 -1
- package/dist/esm/bindings/writRoaRecordV2.js.map +1 -1
- package/dist/esm/custom-bg.js +1 -1
- package/dist/esm/custom-bg.js.map +1 -1
- package/dist/esm/deprecated/utils.js +1 -1
- package/dist/esm/deprecated/utils.js.map +1 -1
- package/dist/esm/devnet.js +1 -1
- package/dist/esm/devnet.js.map +1 -1
- package/dist/esm/error.js.map +1 -1
- package/dist/esm/favorite-domain.js +1 -1
- package/dist/esm/favorite-domain.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/instructions/burnInstruction.js.map +1 -1
- package/dist/esm/instructions/createInstruction.js.map +1 -1
- package/dist/esm/instructions/createInstructionV3.js.map +1 -1
- package/dist/esm/instructions/createReverseInstruction.js.map +1 -1
- package/dist/esm/instructions/createSplitV2Instruction.js.map +1 -1
- package/dist/esm/instructions/createV2Instruction.js.map +1 -1
- package/dist/esm/instructions/createWithNftInstruction.js.map +1 -1
- package/dist/esm/instructions/reallocInstruction.js.map +1 -1
- package/dist/esm/instructions/registerFavoriteInstruction.js.map +1 -1
- package/dist/esm/instructions/transferInstruction.js.map +1 -1
- package/dist/esm/instructions/updateInstruction.js.map +1 -1
- package/dist/esm/int.js.map +1 -1
- package/dist/esm/nft/getDomainMint.js.map +1 -1
- package/dist/esm/nft/getRecordFromMint.js.map +1 -1
- package/dist/esm/nft/retrieveNftOwner.js.map +1 -1
- package/dist/esm/nft/retrieveNftOwnerV2.js.map +1 -1
- package/dist/esm/nft/retrieveNfts.js +1 -1
- package/dist/esm/nft/retrieveNfts.js.map +1 -1
- package/dist/esm/nft/retrieveRecords.js +1 -1
- package/dist/esm/nft/retrieveRecords.js.map +1 -1
- package/dist/esm/nft/state.js.map +1 -1
- package/dist/esm/node_modules/@bonfida/sns-records/dist/index.js +1 -1
- package/dist/esm/node_modules/@noble/curves/esm/abstract/curve.js +2 -2
- package/dist/esm/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -1
- package/dist/esm/node_modules/@noble/curves/esm/abstract/edwards.js +2 -2
- package/dist/esm/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -1
- package/dist/esm/node_modules/@noble/curves/esm/abstract/modular.js +2 -2
- package/dist/esm/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -1
- package/dist/esm/node_modules/@noble/curves/esm/ed25519.js +2 -2
- package/dist/esm/node_modules/@noble/curves/esm/ed25519.js.map +1 -1
- package/dist/esm/node_modules/@noble/curves/esm/utils.js +3 -0
- package/dist/esm/node_modules/@noble/curves/esm/utils.js.map +1 -0
- package/dist/esm/node_modules/@noble/hashes/esm/_md.js +1 -1
- package/dist/esm/node_modules/@noble/hashes/esm/_md.js.map +1 -1
- package/dist/esm/node_modules/@noble/hashes/esm/_u64.js.map +1 -1
- package/dist/esm/node_modules/@noble/hashes/esm/sha2.js +1 -1
- package/dist/esm/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
- package/dist/esm/node_modules/@noble/hashes/esm/utils.js +2 -2
- package/dist/esm/node_modules/@noble/hashes/esm/utils.js.map +1 -1
- package/dist/esm/node_modules/@scure/base/lib/esm/index.js +1 -1
- package/dist/esm/node_modules/@scure/base/lib/esm/index.js.map +1 -1
- package/dist/esm/node_modules/@solana/spl-token/lib/esm/extensions/accountType.js.map +1 -1
- package/dist/esm/node_modules/@solana/spl-token/lib/esm/state/account.js.map +1 -1
- package/dist/esm/node_modules/@solana/spl-token/lib/esm/state/mint.js.map +1 -1
- package/dist/esm/node_modules/base64-js/index.js +1 -1
- package/dist/esm/node_modules/base64-js/index.js.map +1 -1
- package/dist/esm/node_modules/borsh/lib/esm/buffer.js.map +1 -1
- package/dist/esm/node_modules/borsh/lib/esm/deserialize.js +1 -1
- package/dist/esm/node_modules/borsh/lib/esm/deserialize.js.map +1 -1
- package/dist/esm/node_modules/borsh/lib/esm/serialize.js.map +1 -1
- package/dist/esm/node_modules/borsh/lib/esm/utils.js.map +1 -1
- package/dist/esm/node_modules/bs58/node_modules/base-x/src/index.js.map +1 -1
- package/dist/esm/node_modules/buffer/index.js +1 -1
- package/dist/esm/node_modules/buffer/index.js.map +1 -1
- package/dist/esm/node_modules/graphemesplit/index.js +1 -1
- package/dist/esm/node_modules/graphemesplit/index.js.map +1 -1
- package/dist/esm/node_modules/ieee754/index.js.map +1 -1
- package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.js +1 -1
- package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.js.map +1 -1
- package/dist/esm/node_modules/js-base64/base64.js +1 -1
- package/dist/esm/node_modules/js-base64/base64.js.map +1 -1
- package/dist/esm/node_modules/punycode/punycode.es6.js +1 -1
- package/dist/esm/node_modules/punycode/punycode.es6.js.map +1 -1
- package/dist/esm/node_modules/tiny-inflate/index.js.map +1 -1
- package/dist/esm/node_modules/unicode-trie/index.js.map +1 -1
- package/dist/esm/node_modules/unicode-trie/swap.js.map +1 -1
- package/dist/esm/record/checkSolRecord.js.map +1 -1
- package/dist/esm/record/deserializeRecord.js +1 -1
- package/dist/esm/record/deserializeRecord.js.map +1 -1
- package/dist/esm/record/getRecordKeySync.js.map +1 -1
- package/dist/esm/record/getRecords.js +1 -1
- package/dist/esm/record/getRecords.js.map +1 -1
- package/dist/esm/record/serializeRecord.js.map +1 -1
- package/dist/esm/record/serializeSolRecord.js.map +1 -1
- package/dist/esm/record_v2/const.d.ts +1 -0
- package/dist/esm/record_v2/const.js +1 -1
- package/dist/esm/record_v2/const.js.map +1 -1
- package/dist/esm/record_v2/deserializeRecordV2Content.js.map +1 -1
- package/dist/esm/record_v2/getMultipleRecordsV2.d.ts +16 -5
- package/dist/esm/record_v2/getMultipleRecordsV2.js +1 -1
- package/dist/esm/record_v2/getMultipleRecordsV2.js.map +1 -1
- package/dist/esm/record_v2/getRecordV2.d.ts +16 -8
- package/dist/esm/record_v2/getRecordV2.js +1 -1
- package/dist/esm/record_v2/getRecordV2.js.map +1 -1
- package/dist/esm/record_v2/getRecordV2Key.js.map +1 -1
- package/dist/esm/record_v2/serializeRecordV2Content.js.map +1 -1
- package/dist/esm/record_v2/verifyRightOfAssociation.js.map +1 -1
- package/dist/esm/record_v2/{utils.js → verifyStaleness.js} +1 -1
- package/dist/esm/record_v2/verifyStaleness.js.map +1 -0
- package/dist/esm/resolve/resolve.js +1 -1
- package/dist/esm/resolve/resolve.js.map +1 -1
- package/dist/esm/resolve/resolveSolRecordV1.js.map +1 -1
- package/dist/esm/resolve/resolveSolRecordV2.js.map +1 -1
- package/dist/esm/state.js +1 -1
- package/dist/esm/state.js.map +1 -1
- package/dist/esm/twitter/ReverseTwitterRegistryState.js.map +1 -1
- package/dist/esm/twitter/changeVerifiedPubkey.js +1 -1
- package/dist/esm/twitter/createReverseTwitterRegistry.js +1 -1
- package/dist/esm/twitter/createVerifiedTwitterRegistry.js +1 -1
- package/dist/esm/twitter/getTwitterHandleandRegistryKeyViaFilters.js.map +1 -1
- package/dist/esm/types/custom-bg.js.map +1 -1
- package/dist/esm/types/record.js.map +1 -1
- package/dist/esm/utils/findSubdomains.js +1 -1
- package/dist/esm/utils/findSubdomains.js.map +1 -1
- package/dist/esm/utils/getAllDomains.js +1 -1
- package/dist/esm/utils/getAllDomains.js.map +1 -1
- package/dist/esm/utils/getAllRegisteredDomains.js.map +1 -1
- package/dist/esm/utils/getDomainKeySync.js.map +1 -1
- package/dist/esm/utils/getDomainKeysWithReverses.js +1 -1
- package/dist/esm/utils/getDomainKeysWithReverses.js.map +1 -1
- package/dist/esm/utils/getDomainPriceFromName.js.map +1 -1
- package/dist/esm/utils/getHashedNameSync.js.map +1 -1
- package/dist/esm/utils/getNameAccountKeySync.js.map +1 -1
- package/dist/esm/utils/getPythFeedAccountKey.js.map +1 -1
- package/dist/esm/utils/getReverseKeyFromDomainKey.js.map +1 -1
- package/dist/esm/utils/getReverseKeySync.js.map +1 -1
- package/dist/esm/utils/getTokenizedDomains.js +1 -1
- package/dist/esm/utils/getTokenizedDomains.js.map +1 -1
- package/dist/esm/utils/reverseLookupBatch.js +1 -1
- package/dist/esm/utils/reverseLookupBatch.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/utils.js +0 -3
- package/dist/cjs/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
- package/dist/cjs/record_v2/utils.js.map +0 -1
- package/dist/esm/node_modules/@noble/curves/esm/abstract/utils.js +0 -3
- package/dist/esm/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
- package/dist/esm/record_v2/utils.js.map +0 -1
- /package/dist/cjs/record_v2/{utils.d.ts → verifyStaleness.d.ts} +0 -0
- /package/dist/esm/record_v2/{utils.d.ts → verifyStaleness.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"punycode.es6.js","sources":["../../../../node_modules/punycode/punycode.es6.js"],"sourcesContent":["'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n"],"names":["maxInt","base","errors","overflow","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","ucs2decode","string","output","counter","length","value","charCodeAt","extra","push","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","input","inputLength","i","n","bias","basic","lastIndexOf","j","index","oldi","w","codePoint","t","baseMinusT","out","splice","fromCodePoint","encode","currentValue","basicLength","handledCPCount","m","handledCPCountPlusOne","q","qMinusT","join"],"mappings":"AAGA,MAAMA,EAAS,WAGTC,EAAO,GAePC,EAAS,CACdC,SAAY,kDACZ,YAAa,iDACb,gBAAiB,iBAKZC,EAAQC,KAAKD,MACbE,EAAqBC,OAAOC,aAUlC,SAASC,EAAMC,GACd,MAAM,IAAIC,WAAWT,EAA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,GAMN,MAAMI,EAAwBF,EAAiB,EAC3CC,EAAIlB,EAAI9B,GAAOJ,EAASyB,GAAS4B,IACpC5C,EAAM,YAGPgB,IAAU2B,EAAIlB,GAAKmB,EACnBnB,EAAIkB,EAEJ,IAAK,MAAMH,KAAgBlB,EAI1B,GAHIkB,EAAef,KAAOT,EAAQzB,GACjCS,EAAM,YAEHwC,IAAiBf,EAAG,CAEvB,IAAIoB,EAAI7B,EACR,IAAK,IAAIG,EAAI3B,GAA0B2B,GAAK3B,EAAM,CACjD,MAAM0C,EAAIf,GAAKO,EAxVP,EAwVsBP,GAAKO,EAvV3B,MAuVgDP,EAAIO,EAC5D,GAAImB,EAAIX,EACP,MAED,MAAMY,EAAUD,EAAIX,EACdC,EAAa3C,EAAO0C,EAC1B7B,EAAOM,KACNd,EAAmBe,EAAasB,EAAIY,EAAUX,EAAY,KAE3DU,EAAIlD,EAAMmD,EAAUX,EACrB,CAEA9B,EAAOM,KAAKd,EAAmBe,EAAaiC,EAAG,KAC/CnB,EAAOX,EAAMC,EAAO4B,EAAuBF,IAAmBD,GAC9DzB,EAAQ,IACN0B,CACH,GAGC1B,IACAS,CAEH,CACA,OAAOpB,EAAO0C,KAAK,GACpB","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"punycode.es6.js","sources":["../../../../node_modules/punycode/punycode.es6.js"],"sourcesContent":["'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n"],"names":["maxInt","base","errors","overflow","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","ucs2decode","string","output","counter","length","value","charCodeAt","extra","push","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","input","inputLength","i","n","bias","basic","lastIndexOf","j","index","oldi","w","t","baseMinusT","out","splice","fromCodePoint","encode","currentValue","basicLength","handledCPCount","m","handledCPCountPlusOne","q","qMinusT","join"],"mappings":"AAGA,MAAMA,EAAS,WAGTC,EAAO,GAePC,EAAS,CACdC,SAAY,kDACZ,YAAa,iDACb,gBAAiB,iBAKZC,EAAQC,KAAKD,MACbE,EAAqBC,OAAOC,aAUlC,SAASC,EAAMC,GACd,MAAM,IAAIC,WAAWT,EAAOQ,GAC7B,CA0DA,SAASE,EAAWC,GACnB,MAAMC,EAAS,GACf,IAAIC,EAAU,EACd,MAAMC,EAASH,EAAOG,OACtB,KAAOD,EAAUC,GAAQ,CACxB,MAAMC,EAAQJ,EAAOK,WAAWH,KAChC,GAAIE,GAAS,OAAUA,GAAS,OAAUF,EAAUC,EAAQ,CAE3D,MAAMG,EAAQN,EAAOK,WAAWH,KACR,QAAX,MAARI,GACJL,EAAOM,OAAe,KAARH,IAAkB,KAAe,KAARE,GAAiB,QAIxDL,EAAOM,KAAKH,GACZF,IAEF,MACCD,EAAOM,KAAKH,EAEd,CACA,OAAOH,CACR,CAqBA,MAAMO,EAAe,SAASC,GAC7B,OAAIA,GAAa,IAAQA,EAAY,GACvBA,EAAY,GAAlB,GAEJA,GAAa,IAAQA,EAAY,GAC7BA,EAAY,GAEhBA,GAAa,IAAQA,EAAY,IAC7BA,EAAY,GAEbrB,CACR,EAaMsB,EAAe,SAASC,EAAOC,GAGpC,OAAOD,EAAQ,GAAK,IAAMA,EAAQ,MAAgB,GAARC,IAAc,EACzD,EAOMC,EAAQ,SAASC,E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xB,EAAQ,IACNyB,CACH,GAGCzB,IACAS,CAEH,CACA,OAAOtB,EAAO2C,KAAK,GACpB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/tiny-inflate/index.js"],"sourcesContent":["var TINF_OK = 0;\nvar TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n \n this.dest = dest;\n this.destLen = 0;\n \n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nvar sltree = new Tree();\nvar sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nvar length_bits = new Uint8Array(30);\nvar length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nvar dist_bits = new Uint8Array(30);\nvar dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nvar clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nvar code_tree = new Tree();\nvar lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n var i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n var i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nvar offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n var i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n var bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n var val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n \n var sum = 0, cur = 0, len = 0;\n var tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n \n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n var hlit, hdist, hclen;\n var i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n var clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n var sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n var prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n var sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n var length, dist, offs;\n var i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n var length, invlength;\n var i;\n \n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n var d = new Data(source, dest);\n var bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n \n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nmodule.exports = tinf_uncompress;\n"],"names":["Tree","this","table","Uint16Array","trans","Data","source","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","i","sum","offs","tinf_build_tree","t","off","num","tinf_getbit","d","bit","tinf_read_bits","val","tinf_decode_symbol","cur","len","tinf_decode_trees","lt","dt","hlit","hdist","hclen","length","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","tinf_build_fixed_trees","tinyInflate","bfinal","res","Error","slice","subarray"],"mappings":"AAGA,SAASA,IACPC,KAAKC,MAAQ,IAAIC,YAAY,IAC7BF,KAAKG,MAAQ,IAAID,YAAY,IAC/B,CAEA,SAASE,EAAKC,EAAQC,GACpBN,KAAKK,OAASA,EACdL,KAAKO,YAAc,EACnBP,KA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,EAAqBR,EAAaE,EAAa,EAAG,GAClDM,EAAqBL,EAAWC,EAAW,EAAG,GAG9CJ,EAAY,IAAM,EAClBE,EAAY,IAAM,IAElBwC,IAAAA,EA5DA,SAAyBpD,EAAQC,GAC/B,IACIoD,EAAeC,EADfvB,EAAI,IAAIhC,EAAKC,EAAQC,GAGzB,EAAG,CAQD,OANAoD,EAASvB,EAAYC,GAGbE,EAAeF,EAAG,EAAG,IAI3B,KAAK,EAEHuB,EAAMJ,EAAgCnB,GACtC,MACF,KAAK,EAEHuB,EAAMN,EAAwBjB,EAAGvB,EAAQC,GACzC,MACF,KAAK,EAEH6B,EAAkBP,EAAGA,EAAEzB,MAAOyB,EAAExB,OAChC+C,EAAMN,EAAwBjB,EAAGA,EAAEzB,MAAOyB,EAAExB,OAC5C,MACF,QACE+C,GApVc,EAuVlB,GAxVU,IAwVNA,EACF,MAAM,IAAIC,MAAM,aAEnB,QAASF,GAEV,OAAItB,EAAE1B,QAAU0B,EAAE9B,KAAK2C,OACO,mBAAjBb,EAAE9B,KAAKuD,MACTzB,EAAE9B,KAAKuD,MAAM,EAAGzB,EAAE1B,SAElB0B,EAAE9B,KAAKwD,SAAS,EAAG1B,EAAE1B,SAGzB0B,EAAE9B,IACX","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/tiny-inflate/index.js"],"sourcesContent":["var TINF_OK = 0;\nvar TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n \n this.dest = dest;\n this.destLen = 0;\n \n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nvar sltree = new Tree();\nvar sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nvar length_bits = new Uint8Array(30);\nvar length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nvar dist_bits = new Uint8Array(30);\nvar dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nvar clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nvar code_tree = new Tree();\nvar lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n var i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n var i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nvar offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n var i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n var bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n var val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n \n var sum = 0, cur = 0, len = 0;\n var tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n \n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n var hlit, hdist, hclen;\n var i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n var clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n var sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n var prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n var sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n var length, dist, offs;\n var i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n var length, invlength;\n var i;\n \n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n var d = new Data(source, dest);\n var bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n \n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nmodule.exports = tinf_uncompress;\n"],"names":["Tree","this","table","Uint16Array","trans","Data","source","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","i","sum","offs","tinf_build_tree","t","off","num","tinf_getbit","d","bit","tinf_read_bits","val","tinf_decode_symbol","cur","len","tinf_decode_trees","lt","dt","hlit","hdist","hclen","length","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","tinf_build_fixed_trees","tinyInflate","bfinal","res","Error","slice","subarray"],"mappings":"AAGA,SAASA,IACPC,KAAKC,MAAQ,IAAIC,YAAY,IAC7BF,KAAKG,MAAQ,IAAID,YAAY,IAC/B,CAEA,SAASE,EAAKC,EAAQC,GACpBN,KAAKK,OAASA,EACdL,KAAKO,YAAc,EACnBP,KAAKQ,IAAM,EACXR,KAAKS,SAAW,EAEhBT,KAAKM,KAAOA,EACZN,KAAKU,QAAU,EAEfV,KAAKW,MAAQ,IAAIZ,EACjBC,KAAKY,MAAQ,IAAIb,CACnB,CAMA,IAAIc,EAAS,IAAId,EACbe,EAAS,IAAIf,EAGbgB,EAAc,IAAIC,WAAW,IAC7BC,EAAc,IAAIf,YAAY,IAG9BgB,EAAY,IAAIF,WAAW,IAC3BG,EAAY,IAAIjB,YAAY,IAG5BkB,EAAS,IAAIJ,WAAW,CAC1B,GAAI,GAAI,GAAI,EAAG,EAAG,EAAG,EAAG,EACxB,GAAI,EAAG,GAAI,EAAG,GAAI,EAAG,GAAI,EACzB,GAAI,EAAG,KAILK,EAAY,IAAItB,EAChBuB,EAAU,IAAIN,WAAW,KAO7B,SAASO,EAAqBC,EAAMC,EAAMC,EAAOC,GAC/C,IAAIC,EAAGC,EAGP,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,aAEtB,QAAYF,GAEV,OAAItB,EAAE1B,QAAU0B,EAAE9B,KAAK2C,OACO,mBAAjBb,EAAE9B,KAAKuD,MACTzB,EAAE9B,KAAKuD,MAAM,EAAGzB,EAAE1B,SAElB0B,EAAE9B,KAAKwD,SAAS,EAAG1B,EAAE1B,SAGzB0B,EAAE9B,IACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/unicode-trie/index.js"],"sourcesContent":["const inflate = require('tiny-inflate');\nconst { swap32LE } = require('./swap');\n\n// Shift size for getting the index-1 table offset.\nconst SHIFT_1 = 6 + 5;\n\n// Shift size for getting the index-2 table offset.\nconst SHIFT_2 = 5;\n\n// Difference between the two shift sizes,\n// for getting an index-1 offset from an index-2 offset. 6=11-5\nconst SHIFT_1_2 = SHIFT_1 - SHIFT_2;\n\n// Number of index-1 entries for the BMP. 32=0x20\n// This part of the index-1 table is omitted from the serialized form.\nconst OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1;\n\n// Number of entries in an index-2 block. 64=0x40\nconst INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2;\n\n// Mask for getting the lower bits for the in-index-2-block offset. */\nconst INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1;\n\n// Shift size for shifting left the index array values.\n// Increases possible data size with 16-bit index values at the cost\n// of compactability.\n// This requires data blocks to be aligned by DATA_GRANULARITY.\nconst INDEX_SHIFT = 2;\n\n// Number of entries in a data block. 32=0x20\nconst DATA_BLOCK_LENGTH = 1 << SHIFT_2;\n\n// Mask for getting the lower bits for the in-data-block offset.\nconst DATA_MASK = DATA_BLOCK_LENGTH - 1;\n\n// The part of the index-2 table for U+D800..U+DBFF stores values for\n// lead surrogate code _units_ not code _points_.\n// Values for lead surrogate code _points_ are indexed with this portion of the table.\n// Length=32=0x20=0x400>>SHIFT_2. (There are 1024=0x400 lead surrogates.)\nconst LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2;\nconst LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2;\n\n// Count the lengths of both BMP pieces. 2080=0x820\nconst INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH;\n\n// The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n// Length 32=0x20 for lead bytes C0..DF, regardless of SHIFT_2.\nconst UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH;\nconst UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8\n\n// The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n// Variable length, for code points up to highStart, where the last single-value range starts.\n// Maximum length 512=0x200=0x100000>>SHIFT_1.\n// (For 0x100000 supplementary code points U+10000..U+10ffff.)\n//\n// The part of the index-2 table for supplementary code points starts\n// after this index-1 table.\n//\n// Both the index-1 table and the following part of the index-2 table\n// are omitted completely if there is only BMP data.\nconst INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH;\n\n// The alignment size of a data block. Also the granularity for compaction.\nconst DATA_GRANULARITY = 1 << INDEX_SHIFT;\n\nclass UnicodeTrie {\n constructor(data) {\n const isBuffer = (typeof data.readUInt32BE === 'function') && (typeof data.slice === 'function');\n\n if (isBuffer || data instanceof Uint8Array) {\n // read binary format\n let uncompressedLength;\n if (isBuffer) {\n this.highStart = data.readUInt32LE(0);\n this.errorValue = data.readUInt32LE(4);\n uncompressedLength = data.readUInt32LE(8);\n data = data.slice(12);\n } else {\n const view = new DataView(data.buffer);\n this.highStart = view.getUint32(0, true);\n this.errorValue = view.getUint32(4, true);\n uncompressedLength = view.getUint32(8, true);\n data = data.subarray(12);\n }\n\n // double inflate the actual trie data\n data = inflate(data, new Uint8Array(uncompressedLength));\n data = inflate(data, new Uint8Array(uncompressedLength));\n\n // swap bytes from little-endian\n swap32LE(data);\n\n this.data = new Uint32Array(data.buffer);\n\n } else {\n // pre-parsed data\n ({ data: this.data, highStart: this.highStart, errorValue: this.errorValue } = data);\n }\n }\n\n get(codePoint) {\n let index;\n if ((codePoint < 0) || (codePoint > 0x10ffff)) {\n return this.errorValue;\n }\n\n if ((codePoint < 0xd800) || ((codePoint > 0xdbff) && (codePoint <= 0xffff))) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the index.\n // data is stored in the index array itself.\n index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n index = (this.data[LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> SHIFT_2)] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n index = this.data[(INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH) + (codePoint >> SHIFT_1)];\n index = this.data[index + ((codePoint >> SHIFT_2) & INDEX_2_MASK)];\n index = (index << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n return this.data[this.data.length - DATA_GRANULARITY];\n }\n}\n\nmodule.exports = UnicodeTrie;"],"names":["inflate","require$$0","swap32LE","require$$1","unicodeTrie","constructor","data","isBuffer","readUInt32BE","slice","Uint8Array","uncompressedLength","this","highStart","readUInt32LE","errorValue","view","DataView","buffer","getUint32","subarray","Uint32Array","get","codePoint","index","DATA_BLOCK_LENGTH","INDEX_1_OFFSET","INDEX_2_BLOCK_LENGTH","length"],"mappings":"sEAAA,MAAMA,EAAUC,GACVC,SAAEA,GAAaC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/unicode-trie/index.js"],"sourcesContent":["const inflate = require('tiny-inflate');\nconst { swap32LE } = require('./swap');\n\n// Shift size for getting the index-1 table offset.\nconst SHIFT_1 = 6 + 5;\n\n// Shift size for getting the index-2 table offset.\nconst SHIFT_2 = 5;\n\n// Difference between the two shift sizes,\n// for getting an index-1 offset from an index-2 offset. 6=11-5\nconst SHIFT_1_2 = SHIFT_1 - SHIFT_2;\n\n// Number of index-1 entries for the BMP. 32=0x20\n// This part of the index-1 table is omitted from the serialized form.\nconst OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1;\n\n// Number of entries in an index-2 block. 64=0x40\nconst INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2;\n\n// Mask for getting the lower bits for the in-index-2-block offset. */\nconst INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1;\n\n// Shift size for shifting left the index array values.\n// Increases possible data size with 16-bit index values at the cost\n// of compactability.\n// This requires data blocks to be aligned by DATA_GRANULARITY.\nconst INDEX_SHIFT = 2;\n\n// Number of entries in a data block. 32=0x20\nconst DATA_BLOCK_LENGTH = 1 << SHIFT_2;\n\n// Mask for getting the lower bits for the in-data-block offset.\nconst DATA_MASK = DATA_BLOCK_LENGTH - 1;\n\n// The part of the index-2 table for U+D800..U+DBFF stores values for\n// lead surrogate code _units_ not code _points_.\n// Values for lead surrogate code _points_ are indexed with this portion of the table.\n// Length=32=0x20=0x400>>SHIFT_2. (There are 1024=0x400 lead surrogates.)\nconst LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2;\nconst LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2;\n\n// Count the lengths of both BMP pieces. 2080=0x820\nconst INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH;\n\n// The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n// Length 32=0x20 for lead bytes C0..DF, regardless of SHIFT_2.\nconst UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH;\nconst UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8\n\n// The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n// Variable length, for code points up to highStart, where the last single-value range starts.\n// Maximum length 512=0x200=0x100000>>SHIFT_1.\n// (For 0x100000 supplementary code points U+10000..U+10ffff.)\n//\n// The part of the index-2 table for supplementary code points starts\n// after this index-1 table.\n//\n// Both the index-1 table and the following part of the index-2 table\n// are omitted completely if there is only BMP data.\nconst INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH;\n\n// The alignment size of a data block. Also the granularity for compaction.\nconst DATA_GRANULARITY = 1 << INDEX_SHIFT;\n\nclass UnicodeTrie {\n constructor(data) {\n const isBuffer = (typeof data.readUInt32BE === 'function') && (typeof data.slice === 'function');\n\n if (isBuffer || data instanceof Uint8Array) {\n // read binary format\n let uncompressedLength;\n if (isBuffer) {\n this.highStart = data.readUInt32LE(0);\n this.errorValue = data.readUInt32LE(4);\n uncompressedLength = data.readUInt32LE(8);\n data = data.slice(12);\n } else {\n const view = new DataView(data.buffer);\n this.highStart = view.getUint32(0, true);\n this.errorValue = view.getUint32(4, true);\n uncompressedLength = view.getUint32(8, true);\n data = data.subarray(12);\n }\n\n // double inflate the actual trie data\n data = inflate(data, new Uint8Array(uncompressedLength));\n data = inflate(data, new Uint8Array(uncompressedLength));\n\n // swap bytes from little-endian\n swap32LE(data);\n\n this.data = new Uint32Array(data.buffer);\n\n } else {\n // pre-parsed data\n ({ data: this.data, highStart: this.highStart, errorValue: this.errorValue } = data);\n }\n }\n\n get(codePoint) {\n let index;\n if ((codePoint < 0) || (codePoint > 0x10ffff)) {\n return this.errorValue;\n }\n\n if ((codePoint < 0xd800) || ((codePoint > 0xdbff) && (codePoint <= 0xffff))) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the index.\n // data is stored in the index array itself.\n index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n index = (this.data[LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> SHIFT_2)] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n index = this.data[(INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH) + (codePoint >> SHIFT_1)];\n index = this.data[index + ((codePoint >> SHIFT_2) & INDEX_2_MASK)];\n index = (index << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n return this.data[this.data.length - DATA_GRANULARITY];\n }\n}\n\nmodule.exports = UnicodeTrie;"],"names":["inflate","require$$0","swap32LE","require$$1","unicodeTrie","constructor","data","isBuffer","readUInt32BE","slice","Uint8Array","uncompressedLength","this","highStart","readUInt32LE","errorValue","view","DataView","buffer","getUint32","subarray","Uint32Array","get","codePoint","index","DATA_BLOCK_LENGTH","INDEX_1_OFFSET","INDEX_2_BLOCK_LENGTH","length"],"mappings":"sEAAA,MAAMA,EAAUC,GACVC,SAAEA,GAAaC,EAsIrB,IAAAC,EAtEA,MACEC,WAAAA,CAAYC,GACV,MAAMC,EAAyC,mBAAtBD,EAAKE,cAAuD,mBAAfF,EAAKG,MAE3E,GAAIF,GAAYD,aAAgBI,WAAY,CAE1C,IAAIC,EACJ,GAAIJ,EACFK,KAAKC,UAAYP,EAAKQ,aAAa,GACnCF,KAAKG,WAAaT,EAAKQ,aAAa,GACpCH,EAAqBL,EAAKQ,aAAa,GACvCR,EAAOA,EAAKG,MAAM,QACb,CACL,MAAMO,EAAO,IAAIC,SAASX,EAAKY,QAC/BN,KAAKC,UAAYG,EAAKG,UAAU,GAAG,GACnCP,KAAKG,WAAaC,EAAKG,UAAU,GAAG,GACpCR,EAAqBK,EAAKG,UAAU,GAAG,GACvCb,EAAOA,EAAKc,SAAS,GAC7B,CAGMd,EAAON,EAAQM,EAAM,IAAII,WAAWC,IACpCL,EAAON,EAAQM,EAAM,IAAII,WAAWC,IAGpCT,EAASI,GAETM,KAAKN,KAAO,IAAIe,YAAYf,EAAKY,OAEvC,OAESZ,KAAMM,KAAKN,KAAMO,UAAWD,KAAKC,UAAWE,WAAYH,KAAKG,YAAeT,EAErF,CAEEgB,GAAAA,CAAIC,GACF,IAAIC,EACJ,OAAKD,EAAY,GAAOA,EAAY,QAC3BX,KAAKG,WAGTQ,EAAY,OAAaA,EAAY,OAAYA,GAAa,OAIjEC,GAASZ,KAAKN,KAAKiB,GAvGT,IAoBI,IAMFE,GA6EgDF,GACrDX,KAAKN,KAAKkB,IAGfD,GAAa,OAKfC,GAASZ,KAAKN,KAhFQ,MAgFqBiB,EAAY,OAhH7C,KAoBI,IAMFE,GAsFmFF,GACxFX,KAAKN,KAAKkB,IAGfD,EAAYX,KAAKC,WAEnBW,EAAQZ,KAAKN,KAAMoB,MAAgDH,GAzHzD,KA0HVC,EAAQZ,KAAKN,KAAKkB,GAAUD,GAvHlB,EAcKI,KA0GfH,GAASA,GApGK,IAMFC,GA8FsBF,GAC3BX,KAAKN,KAAKkB,IAGZZ,KAAKN,KAAKM,KAAKN,KAAKsB,OApEN,EAqEzB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.js","sources":["../../../../node_modules/unicode-trie/swap.js"],"sourcesContent":["const isBigEndian = (new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12);\n\nconst swap = (b, n, m) => {\n let i = b[n];\n b[n] = b[m];\n b[m] = i;\n};\n\nconst swap32 = array => {\n const len = array.length;\n for (let i = 0; i < len; i += 4) {\n swap(array, i, i + 3);\n swap(array, i + 1, i + 2);\n }\n};\n\nconst swap32LE = array => {\n if (isBigEndian) {\n swap32(array);\n }\n};\n\nmodule.exports = {\n swap32LE: swap32LE\n};\n"],"names":["isBigEndian","Uint8Array","Uint32Array","buffer","swap","b","n","m","i","swap_1","swap32LE","array","len","length","swap32"],"mappings":"AAAA,MAAMA,EAA2E,KAA5D,IAAIC,WAAW,IAAIC,YAAY,CAAC,YAAaC,QAAQ,GAEpEC,EAAOA,CAACC,EAAGC,EAAGC,KAClB,IAAIC,EAAIH,EAAEC,GACVD,EAAEC,GAAKD,EAAEE,GACTF,EAAEE,GAAKC,
|
|
1
|
+
{"version":3,"file":"swap.js","sources":["../../../../node_modules/unicode-trie/swap.js"],"sourcesContent":["const isBigEndian = (new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12);\n\nconst swap = (b, n, m) => {\n let i = b[n];\n b[n] = b[m];\n b[m] = i;\n};\n\nconst swap32 = array => {\n const len = array.length;\n for (let i = 0; i < len; i += 4) {\n swap(array, i, i + 3);\n swap(array, i + 1, i + 2);\n }\n};\n\nconst swap32LE = array => {\n if (isBigEndian) {\n swap32(array);\n }\n};\n\nmodule.exports = {\n swap32LE: swap32LE\n};\n"],"names":["isBigEndian","Uint8Array","Uint32Array","buffer","swap","b","n","m","i","swap_1","swap32LE","array","len","length","swap32"],"mappings":"AAAA,MAAMA,EAA2E,KAA5D,IAAIC,WAAW,IAAIC,YAAY,CAAC,YAAaC,QAAQ,GAEpEC,EAAOA,CAACC,EAAGC,EAAGC,KAClB,IAAIC,EAAIH,EAAEC,GACVD,EAAEC,GAAKD,EAAEE,GACTF,EAAEE,GAAKC,GAiBT,IAAAC,EAAiB,CACfC,SAPeC,IACXX,GATSW,KACb,MAAMC,EAAMD,EAAME,OAClB,IAAK,IAAIL,EAAI,EAAGA,EAAII,EAAKJ,GAAK,EAC5BJ,EAAKO,EAAOH,EAAGA,EAAI,GACnBJ,EAAKO,EAAOH,EAAI,EAAGA,EAAI,IAMvBM,CAAOH","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkSolRecord.js","sources":["../../../src/record/checkSolRecord.ts"],"sourcesContent":[null],"names":["checkSolRecord","record","signedRecord","pubkey","ed25519","verify","toBytes"],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkSolRecord.js","sources":["../../../src/record/checkSolRecord.ts"],"sourcesContent":[null],"names":["checkSolRecord","record","signedRecord","pubkey","ed25519","verify","toBytes"],"mappings":"uEAUO,MAAMA,EAAiB,CAC5BC,EACAC,EACAC,IAEOC,EAAQC,OAAOH,EAAcD,EAAQE,EAAOG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../node_modules/buffer/index.js";import{b as e}from"../node_modules/bs58/index.js";import{PublicKey as r}from"@solana/web3.js";import{bech32 as o}from"../node_modules/@scure/base/lib/esm/index.js";import{decode as t}from"../node_modules/punycode/punycode.es6.js";import{i}from"../node_modules/ipaddr.js/lib/ipaddr.js";import{RECORD_V1_SIZE as n,Record as s}from"../types/record.js";import{InvalidRecordDataError as f}from"../error.js";import{checkSolRecord as c}from"./checkSolRecord.js";import{__exports as d}from"../_virtual/index.js";const l=(l,m,u)=>{const a=null==l?void 0:l.data;if(!a)return;if(0===a.compare(d.Buffer.alloc(a.length)))return;const p=n.get(m),j=(e=>{const r=Array.from(e);return r.length-1-r.reverse().findIndex(
|
|
1
|
+
import"../node_modules/buffer/index.js";import{b as e}from"../node_modules/bs58/index.js";import{PublicKey as r}from"@solana/web3.js";import{bech32 as o}from"../node_modules/@scure/base/lib/esm/index.js";import{decode as t}from"../node_modules/punycode/punycode.es6.js";import{i}from"../node_modules/ipaddr.js/lib/ipaddr.js";import{RECORD_V1_SIZE as n,Record as s}from"../types/record.js";import{InvalidRecordDataError as f}from"../error.js";import{checkSolRecord as c}from"./checkSolRecord.js";import{__exports as d}from"../_virtual/index.js";const l=(l,m,u)=>{const a=null==l?void 0:l.data;if(!a)return;if(0===a.compare(d.Buffer.alloc(a.length)))return;const p=n.get(m),j=(e=>{const r=Array.from(e);return r.length-1-r.reverse().findIndex(e=>0!==e)+1})(a);if(!p){const e=a.slice(0,j).toString("utf-8");return m===s.CNAME||m===s.TXT?t(e):e}if(m===s.SOL){const r=new TextEncoder,o=d.Buffer.concat([a.slice(0,32),u.toBuffer()]),t=r.encode(o.toString("hex"));if(c(t,a.slice(32,96),l.owner))return e.encode(a.slice(0,32))}if(p&&j!==p){const e=a.slice(0,j).toString("utf-8");if(m===s.Injective){const r=o.decodeToBytes(e);if("inj"===r.prefix&&20===r.bytes.length)return e}else if(m===s.BSC||m===s.ETH){const r=e.slice(0,2),o=e.slice(2);if("0x"===r&&20===d.Buffer.from(o,"hex").length)return e}else if((m===s.A||m===s.AAAA)&&i.isValid(e))return e;throw new f("The record data is malformed")}if(m===s.ETH||m===s.BSC)return"0x"+a.slice(0,p).toString("hex");if(m===s.Injective)return o.encode("inj",o.toWords(a.slice(0,p)));if(m===s.A||m===s.AAAA)return i.fromByteArray([...a.slice(0,p)]).toString();if(m===s.Background)return new r(a.slice(0,p)).toString();throw new f("The record data is malformed")};export{l as deserializeRecord};
|
|
2
2
|
//# sourceMappingURL=deserializeRecord.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializeRecord.js","sources":["../../../src/record/deserializeRecord.ts"],"sourcesContent":[null],"names":["deserializeRecord","registry","record","recordKey","buffer","data","compare","Buffer","alloc","length","size","RECORD_V1_SIZE","get","idx","arr","Array","from","reverse","findIndex","byte","trimNullPaddingIdx","str","slice","toString","Record","CNAME","TXT","decodePunnyCode","SOL","encoder","TextEncoder","expectedBuffer","concat","toBuffer","expected","encode","checkSolRecord","owner","bs58Encode","address","Injective","decoded","bech32","decodeToBytes","prefix","bytes","BSC","ETH","hex","A","AAAA","isValidIp","InvalidRecordDataError","toWords","ipFromByteArray","
|
|
1
|
+
{"version":3,"file":"deserializeRecord.js","sources":["../../../src/record/deserializeRecord.ts"],"sourcesContent":[null],"names":["deserializeRecord","registry","record","recordKey","buffer","data","compare","Buffer","alloc","length","size","RECORD_V1_SIZE","get","idx","arr","Array","from","reverse","findIndex","byte","trimNullPaddingIdx","str","slice","toString","Record","CNAME","TXT","decodePunnyCode","SOL","encoder","TextEncoder","expectedBuffer","concat","toBuffer","expected","encode","checkSolRecord","owner","bs58Encode","address","Injective","decoded","bech32","decodeToBytes","prefix","bytes","BSC","ETH","hex","A","AAAA","isValidIp","InvalidRecordDataError","toWords","ipFromByteArray","Background","PublicKey"],"mappings":"giBAeA,MAcaA,EAAoB,CAC/BC,EACAC,EACAC,KAEA,MAAMC,EAASH,aAAQ,EAARA,EAAUI,KACzB,IAAKD,EAAQ,OACb,GAAoD,IAAhDA,EAAOE,QAAQC,EAAAA,OAAOC,MAAMJ,EAAOK,SAAgB,OAEvD,MAAMC,EAAOC,EAAeC,IAAIV,GAC1BW,EAxBmB,CAACT,IAC1B,MAAMU,EAAMC,MAAMC,KAAKZ,GAGvB,OADEU,EAAIL,OAAS,EAAIK,EAAIG,UAAUC,UAAWC,GAAkB,IAATA,GAChC,GAoBTC,CAAmBhB,GAE/B,IAAKM,EAAM,CACT,MAAMW,EAAMjB,EAAOkB,MAAM,EAAGT,GAAKU,SAAS,SAC1C,OAAIrB,IAAWsB,EAAOC,OAASvB,IAAWsB,EAAOE,IACxCC,EAAgBN,GAElBA,CACT,CAGA,GAAInB,IAAWsB,EAAOI,IAAK,CACzB,MAAMC,EAAU,IAAIC,YACdC,EAAiBxB,EAAAA,OAAOyB,OAAO,CACnC5B,EAAOkB,MAAM,EAAG,IAChBnB,EAAU8B,aAENC,EAAWL,EAAQM,OAAOJ,EAAeR,SAAS,QAMxD,GALca,EACZF,EACA9B,EAAOkB,MAAM,GAAI,IACjBrB,EAASoC,OAGT,OAAOC,EAAAA,OAAWlC,EAAOkB,MAAM,EAAG,IAEtC,CAGA,GAAIZ,GAAQG,IAAQH,EAAM,CACxB,MAAM6B,EAAUnC,EAAOkB,MAAM,EAAGT,GAAKU,SAAS,SAC9C,GAAIrB,IAAWsB,EAAOgB,UAAW,CAC/B,MAAMC,EAAUC,EAAOC,cAAcJ,GACrC,GAAuB,QAAnBE,EAAQG,QAA6C,KAAzBH,EAAQI,MAAMpC,OAC5C,OAAO8B,CAEX,MAAO,GAAIrC,IAAWsB,EAAOsB,KAAO5C,IAAWsB,EAAOuB,IAAK,CACzD,MAAMH,EAASL,EAAQjB,MAAM,EAAG,GAC1B0B,EAAMT,EAAQjB,MAAM,GAC1B,GAAe,OAAXsB,GAAsD,KAAnCrC,SAAOS,KAAKgC,EAAK,OAAOvC,OAC7C,OAAO8B,CAEX,MAAO,IAAIrC,IAAWsB,EAAOyB,GAAK/C,IAAWsB,EAAO0B,OAC9CC,EAAAA,QAAUZ,GACZ,OAAOA,EAGX,MAAM,IAAIa,EAAuB,+BACnC,CAEA,GAAIlD,IAAWsB,EAAOuB,KAAO7C,IAAWsB,EAAOsB,IAC7C,MAAO,KAAO1C,EAAOkB,MAAM,EAAGZ,GAAMa,SAAS,OACxC,GAAIrB,IAAWsB,EAAOgB,UAC3B,OAAOE,EAAOP,OAAO,MAAOO,EAAOW,QAAQjD,EAAOkB,MAAM,EAAGZ,KACtD,GAAIR,IAAWsB,EAAOyB,GAAK/C,IAAWsB,EAAO0B,KAClD,OAAOI,EAAAA,cAAgB,IAAIlD,EAAOkB,MAAM,EAAGZ,KAAQa,WAC9C,GAAIrB,IAAWsB,EAAO+B,WAC3B,OAAO,IAAIC,EAAUpD,EAAOkB,MAAM,EAAGZ,IAAOa,WAE9C,MAAM,IAAI6B,EAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecordKeySync.js","sources":["../../../src/record/getRecordKeySync.ts"],"sourcesContent":[null],"names":["getRecordKeySync","domain","record","pubkey","getDomainKeySync","RecordVersion","V1"],"mappings":"yHASaA,EAAmB,CAACC,EAAgBC,KAC/C,MAAMC,OAAEA,GAAWC,EAAiBF,EAAS,IAAMD,EAAQI,EAAcC,IACzE,OAAOH
|
|
1
|
+
{"version":3,"file":"getRecordKeySync.js","sources":["../../../src/record/getRecordKeySync.ts"],"sourcesContent":[null],"names":["getRecordKeySync","domain","record","pubkey","getDomainKeySync","RecordVersion","V1"],"mappings":"yHASaA,EAAmB,CAACC,EAAgBC,KAC/C,MAAMC,OAAEA,GAAWC,EAAiBF,EAAS,IAAMD,EAAQI,EAAcC,IACzE,OAAOH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{NameRegistryState as r}from"../state.js";import{getRecordKeySync as e}from"./getRecordKeySync.js";import{deserializeRecord as t}from"./deserializeRecord.js";async function o(o,i,a,m){const c=a.map(
|
|
1
|
+
import{NameRegistryState as r}from"../state.js";import{getRecordKeySync as e}from"./getRecordKeySync.js";import{deserializeRecord as t}from"./deserializeRecord.js";async function o(o,i,a,m){const c=a.map(r=>e(i,r)),n=await r.retrieveBatch(o,c);return m?n.map((r,o)=>{if(r)return t(r,a[o],e(i,a[o]))}):n}export{o as getRecords};
|
|
2
2
|
//# sourceMappingURL=getRecords.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecords.js","sources":["../../../src/record/getRecords.ts"],"sourcesContent":[null],"names":["async","getRecords","connection","domain","records","deserialize","pubkeys","map","record","getRecordKeySync","registries","NameRegistryState","retrieveBatch","e","idx","deserializeRecord"],"mappings":"oKAsBOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAUF,EAAQG,
|
|
1
|
+
{"version":3,"file":"getRecords.js","sources":["../../../src/record/getRecords.ts"],"sourcesContent":[null],"names":["async","getRecords","connection","domain","records","deserialize","pubkeys","map","record","getRecordKeySync","registries","NameRegistryState","retrieveBatch","e","idx","deserializeRecord"],"mappings":"oKAsBOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAUF,EAAQG,IAAKC,GAAWC,EAAiBN,EAAQK,IAC3DE,QAAmBC,EAAkBC,cAAcV,EAAYI,GAErE,OAAID,EACKK,EAAWH,IAAI,CAACM,EAAGC,KACxB,GAAKD,EACL,OAAOE,EACLF,EACAT,EAAQU,GACRL,EAAiBN,EAAQC,EAAQU,OAIhCJ,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializeRecord.js","sources":["../../../src/record/serializeRecord.ts"],"sourcesContent":[null],"names":["serializeRecord","str","record","RECORD_V1_SIZE","get","Record","CNAME","TXT","encodePunycode","Buffer","from","SOL","UnsupportedRecordError","ETH","BSC","check","slice","InvalidEvmAddressError","Injective","decoded","bech32","decodeToBytes","prefix","InvalidInjectiveAddressError","bytes","length","A","array","parseIp","toByteArray","InvalidARecordError","AAAA","InvalidAAAARecordError","Background","PublicKey","toBuffer","InvalidRecordInputError"],"mappings":"8nBAuBaA,EAAkB,CAACC,EAAaC,KAG3C,IAFaC,EAAeC,IAAIF,GAM9B,OAHIA,IAAWG,EAAOC,OAASJ,IAAWG,EAAOE,MAC/CN,EAAMO,EAAeP,IAEhBQ,SAAOC,KAAKT,EAAK,SAG1B,GAAIC,IAAWG,EAAOM,IACpB,MAAM,IAAIC,EAAuB,2CAC5B,GAAIV,IAAWG,EAAOQ,KAAOX,IAAWG,EAAOS,IAKpD,OAJAC,EACsB,OAApBd,EAAIe,MAAM,EAAG,GACb,IAAIC,EAAuB,4CAEtBR,EAAAA,OAAOC,KAAKT,EAAIe,MAAM,GAAI,OAC5B,GAAId,IAAWG,EAAOa,UAAW,CACtC,MAAMC,EAAUC,EAAOC,cAAcpB,GAWrC,OAVAc,EACqB,QAAnBI,EAAQG,OACR,IAAIC,EACF,4CAGJR,EAC2B,KAAzBI,EAAQK,MAAMC,OACd,IAAIF,EAA6B,0CAE5Bd,SAAOC,KAAKS,EAAQK,
|
|
1
|
+
{"version":3,"file":"serializeRecord.js","sources":["../../../src/record/serializeRecord.ts"],"sourcesContent":[null],"names":["serializeRecord","str","record","RECORD_V1_SIZE","get","Record","CNAME","TXT","encodePunycode","Buffer","from","SOL","UnsupportedRecordError","ETH","BSC","check","slice","InvalidEvmAddressError","Injective","decoded","bech32","decodeToBytes","prefix","InvalidInjectiveAddressError","bytes","length","A","array","parseIp","toByteArray","InvalidARecordError","AAAA","InvalidAAAARecordError","Background","PublicKey","toBuffer","InvalidRecordInputError"],"mappings":"8nBAuBaA,EAAkB,CAACC,EAAaC,KAG3C,IAFaC,EAAeC,IAAIF,GAM9B,OAHIA,IAAWG,EAAOC,OAASJ,IAAWG,EAAOE,MAC/CN,EAAMO,EAAeP,IAEhBQ,SAAOC,KAAKT,EAAK,SAG1B,GAAIC,IAAWG,EAAOM,IACpB,MAAM,IAAIC,EAAuB,2CAC5B,GAAIV,IAAWG,EAAOQ,KAAOX,IAAWG,EAAOS,IAKpD,OAJAC,EACsB,OAApBd,EAAIe,MAAM,EAAG,GACb,IAAIC,EAAuB,4CAEtBR,EAAAA,OAAOC,KAAKT,EAAIe,MAAM,GAAI,OAC5B,GAAId,IAAWG,EAAOa,UAAW,CACtC,MAAMC,EAAUC,EAAOC,cAAcpB,GAWrC,OAVAc,EACqB,QAAnBI,EAAQG,OACR,IAAIC,EACF,4CAGJR,EAC2B,KAAzBI,EAAQK,MAAMC,OACd,IAAIF,EAA6B,0CAE5Bd,SAAOC,KAAKS,EAAQK,MAC7B,CAAO,GAAItB,IAAWG,EAAOqB,EAAG,CAC9B,MAAMC,EAAQC,EAAAA,MAAQ3B,GAAK4B,cAK3B,OAJAd,EACmB,IAAjBY,EAAMF,OACN,IAAIK,EAAoB,4CAEnBrB,EAAAA,OAAOC,KAAKiB,EACrB,CAAO,GAAIzB,IAAWG,EAAO0B,KAAM,CACjC,MAAMJ,EAAQC,EAAAA,MAAQ3B,GAAK4B,cAK3B,OAJAd,EACmB,KAAjBY,EAAMF,OACN,IAAIO,EAAuB,6CAEtBvB,EAAAA,OAAOC,KAAKiB,EACrB,CAAO,GAAIzB,IAAWG,EAAO4B,WAC3B,OAAO,IAAIC,EAAUjC,GAAKkC,WAE5B,MAAM,IAAIC,EAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializeSolRecord.js","sources":["../../../src/record/serializeSolRecord.ts"],"sourcesContent":[null],"names":["serializeSolRecord","content","recordKey","signer","signature","expected","Buffer","concat","toBuffer","encodedMessage","TextEncoder","encode","toString","valid","checkSolRecord","check","InvalidSignatureError"],"mappings":"4OAeO,MAAMA,EAAqB,CAChCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EAAWC,SAAOC,OAAO,CAACN,EAAQO,WAAYN,EAAUM,aACxDC,GAAiB,IAAIC,aAAcC,OAAON,EAASO,SAAS,QAC5DC,EAAQC,EAAeL,EAAgBL,EAAWD,GAGxD,OAFAY,EAAMF,EAAO,IAAIG,EAAsB,iCAEhCV,EAAAA,OAAOC,OAAO,CAACN,EAAQO,WAAYJ
|
|
1
|
+
{"version":3,"file":"serializeSolRecord.js","sources":["../../../src/record/serializeSolRecord.ts"],"sourcesContent":[null],"names":["serializeSolRecord","content","recordKey","signer","signature","expected","Buffer","concat","toBuffer","encodedMessage","TextEncoder","encode","toString","valid","checkSolRecord","check","InvalidSignatureError"],"mappings":"4OAeO,MAAMA,EAAqB,CAChCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EAAWC,SAAOC,OAAO,CAACN,EAAQO,WAAYN,EAAUM,aACxDC,GAAiB,IAAIC,aAAcC,OAAON,EAASO,SAAS,QAC5DC,EAAQC,EAAeL,EAAgBL,EAAWD,GAGxD,OAFAY,EAAMF,EAAO,IAAIG,EAAsB,iCAEhCV,EAAAA,OAAOC,OAAO,CAACN,EAAQO,WAAYJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Record as e}from"../types/record.js";import{PublicKey as t}from"@solana/web3.js";const
|
|
1
|
+
import{Record as e}from"../types/record.js";import{PublicKey as t}from"@solana/web3.js";export{Validation}from"../node_modules/@bonfida/sns-records/dist/index.js";const o=new Map([[e.Url,new t("ExXjtfdQe8JacoqP9Z535WzQKjF4CzW1TTRKRgpxvya3")],[e.CNAME,new t("ExXjtfdQe8JacoqP9Z535WzQKjF4CzW1TTRKRgpxvya3")]]),i=new Set([e.ETH,e.Injective,e.BSC,e.BASE]),n=new Set([e.ETH,e.BSC,e.BASE]),r=new Set([e.IPFS,e.ARWV,e.LTC,e.DOGE,e.Email,e.Url,e.Discord,e.Github,e.Reddit,e.Twitter,e.Telegram,e.Pic,e.SHDW,e.POINT,e.Backpack,e.TXT,e.CNAME,e.BTC,e.IPNS,e.Bio]),a=new Set([e.BASE,e.BSC,e.ETH,e.Injective,e.SOL]);export{i as ETH_ROA_RECORDS,n as EVM_RECORDS,o as GUARDIANS,a as SELF_SIGNED,r as UTF8_ENCODED};
|
|
2
2
|
//# sourceMappingURL=const.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sources":["../../../src/record_v2/const.ts"],"sourcesContent":[null],"names":["GUARDIANS","Map","Record","Url","PublicKey","CNAME","ETH_ROA_RECORDS","Set","ETH","Injective","BSC","BASE","EVM_RECORDS","UTF8_ENCODED","IPFS","ARWV","LTC","DOGE","Email","Discord","Github","Reddit","Twitter","Telegram","Pic","SHDW","POINT","Backpack","TXT","BTC","IPNS","Bio","SELF_SIGNED","SOL"],"mappings":"
|
|
1
|
+
{"version":3,"file":"const.js","sources":["../../../src/record_v2/const.ts"],"sourcesContent":[null],"names":["GUARDIANS","Map","Record","Url","PublicKey","CNAME","ETH_ROA_RECORDS","Set","ETH","Injective","BSC","BASE","EVM_RECORDS","UTF8_ENCODED","IPFS","ARWV","LTC","DOGE","Email","Discord","Github","Reddit","Twitter","Telegram","Pic","SHDW","POINT","Backpack","TXT","BTC","IPNS","Bio","SELF_SIGNED","SOL"],"mappings":"mKAOO,MAAMA,EAAY,IAAIC,IAAuB,CAClD,CAACC,EAAOC,IAAK,IAAIC,EAAU,iDAC3B,CAACF,EAAOG,MAAO,IAAID,EAAU,mDAMlBE,EAAkB,IAAIC,IAAY,CAC7CL,EAAOM,IACPN,EAAOO,UACPP,EAAOQ,IACPR,EAAOS,OAGIC,EAAc,IAAIL,IAAY,CACzCL,EAAOM,IACPN,EAAOQ,IACPR,EAAOS,OAMIE,EAAe,IAAIN,IAAY,CAC1CL,EAAOY,KACPZ,EAAOa,KACPb,EAAOc,IACPd,EAAOe,KACPf,EAAOgB,MACPhB,EAAOC,IACPD,EAAOiB,QACPjB,EAAOkB,OACPlB,EAAOmB,OACPnB,EAAOoB,QACPpB,EAAOqB,SACPrB,EAAOsB,IACPtB,EAAOuB,KACPvB,EAAOwB,MACPxB,EAAOyB,SACPzB,EAAO0B,IACP1B,EAAOG,MACPH,EAAO2B,IACP3B,EAAO4B,KACP5B,EAAO6B,MAOIC,EAAc,IAAIzB,IAAY,CACzCL,EAAOS,KACPT,EAAOQ,IACPR,EAAOM,IACPN,EAAOO,UACPP,EAAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializeRecordV2Content.js","sources":["../../../src/record_v2/deserializeRecordV2Content.ts"],"sourcesContent":[null],"names":["deserializeRecordV2Content","content","record","UTF8_ENCODED","has","decoded","toString","Record","CNAME","TXT","decodePunnycode","SOL","PublicKey","toBase58","EVM_RECORDS","Injective","bech32","encode","toWords","A","AAAA","ipFromByteArray","
|
|
1
|
+
{"version":3,"file":"deserializeRecordV2Content.js","sources":["../../../src/record_v2/deserializeRecordV2Content.ts"],"sourcesContent":[null],"names":["deserializeRecordV2Content","content","record","UTF8_ENCODED","has","decoded","toString","Record","CNAME","TXT","decodePunnycode","SOL","PublicKey","toBase58","EVM_RECORDS","Injective","bech32","encode","toWords","A","AAAA","ipFromByteArray","InvalidRecordDataError"],"mappings":"kZAgBaA,EAA6B,CACxCC,EACAC,KAIA,GAFoBC,EAAaC,IAAIF,GAEpB,CACf,MAAMG,EAAUJ,EAAQK,SAAS,SACjC,OAAIJ,IAAWK,EAAOC,OAASN,IAAWK,EAAOE,IACxCC,EAAgBL,GAElBA,CACT,CAAO,GAAIH,IAAWK,EAAOI,IAC3B,OAAO,IAAIC,EAAUX,GAASY,WACzB,GAAIC,EAAYV,IAAIF,GACzB,MAAO,KAAOD,EAAQK,SAAS,OAC1B,GAAIJ,IAAWK,EAAOQ,UAC3B,OAAOC,EAAOC,OAAO,MAAOD,EAAOE,QAAQjB,IACtC,GAAIC,IAAWK,EAAOY,GAAKjB,IAAWK,EAAOa,KAClD,OAAOC,EAAAA,cAAgB,IAAIpB,IAAUK,WAErC,MAAM,IAAIgB,EAAuB"}
|
|
@@ -7,14 +7,25 @@ interface GetRecordV2Options {
|
|
|
7
7
|
export interface RecordResult {
|
|
8
8
|
retrievedRecord: SnsRecord;
|
|
9
9
|
record: Record;
|
|
10
|
+
verified: {
|
|
11
|
+
staleness: boolean;
|
|
12
|
+
roa?: boolean;
|
|
13
|
+
};
|
|
10
14
|
deserializedContent?: string;
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @param
|
|
17
|
-
* @
|
|
17
|
+
* Retrieves multiple records V2 for a domain, verifies the staleness and right
|
|
18
|
+
* of association of each, and optionally deserializes their content.
|
|
19
|
+
*
|
|
20
|
+
* @param connection The Solana RPC connection object.
|
|
21
|
+
* @param domain The `.sol` domain name that owns the records.
|
|
22
|
+
* @param records The list of record types to retrieve.
|
|
23
|
+
* @param options Optional retrieval settings.
|
|
24
|
+
* @param options.deserialize When `true`, deserializes the raw content of each record.
|
|
25
|
+
* @returns An array of results in the same order as `records`. Each entry
|
|
26
|
+
* contains the record type, the raw SNS record account, staleness and
|
|
27
|
+
* right-of-association verification results, and optionally the deserialized
|
|
28
|
+
* content. Entries are `undefined` for records that do not exist on-chain.
|
|
18
29
|
*/
|
|
19
30
|
export declare function getMultipleRecordsV2(connection: Connection, domain: string, records: Record[], options?: GetRecordV2Options): Promise<(RecordResult | undefined)[]>;
|
|
20
31
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{PublicKey as e}from"@solana/web3.js";import{Record as r,Validation as t}from"../node_modules/@bonfida/sns-records/dist/index.js";import{getRecordV2Key as o}from"./getRecordV2Key.js";import{deserializeRecordV2Content as i}from"./deserializeRecordV2Content.js";import{NameRegistryState as a}from"../state.js";import{getDomainKeySync as s}from"../utils/getDomainKeySync.js";import{ETH_ROA_RECORDS as n,SELF_SIGNED as d,GUARDIANS as m}from"./const.js";async function l(l,c,f,p={}){const u=f.map(e=>o(c,e)),[{registry:g,nftOwner:v},h]=await Promise.all([a.retrieve(l,s(c).pubkey),r.retrieveBatch(l,u)]),j=v||g.owner;return h.map((r,o)=>{var a;if(!r)return;const s=f[o],l=r.getStalenessId(),c=r.getRoAId(),u=n.has(s)?t.Ethereum:t.Solana,g=d.has(s)?r.getContent():null===(a=m.get(s))||void 0===a?void 0:a.toBuffer();return{record:s,retrievedRecord:r,verified:{staleness:j.equals(new e(l))&&r.header.stalenessValidation===t.Solana,...void 0!==g&&{roa:0===g.compare(c)&&r.header.rightOfAssociationValidation===u}},...p.deserialize&&{deserializedContent:i(r.getContent(),s)}}})}export{l as getMultipleRecordsV2};
|
|
2
2
|
//# sourceMappingURL=getMultipleRecordsV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMultipleRecordsV2.js","sources":["../../../src/record_v2/getMultipleRecordsV2.ts"],"sourcesContent":[null],"names":["async","getMultipleRecordsV2","connection","domain","records","options","pubkeys","map","record","getRecordV2Key","retrievedRecords","SnsRecord","retrieveBatch","
|
|
1
|
+
{"version":3,"file":"getMultipleRecordsV2.js","sources":["../../../src/record_v2/getMultipleRecordsV2.ts"],"sourcesContent":[null],"names":["async","getMultipleRecordsV2","connection","domain","records","options","pubkeys","map","record","getRecordV2Key","registry","nftOwner","retrievedRecords","Promise","all","NameRegistryState","retrieve","getDomainKeySync","pubkey","SnsRecord","retrieveBatch","owner","retrievedRecord","idx","stalenessId","getStalenessId","roaId","getRoAId","validation","ETH_ROA_RECORDS","has","Validation","Ethereum","Solana","verifier","SELF_SIGNED","getContent","_a","GUARDIANS","get","toBuffer","verified","staleness","equals","PublicKey","header","stalenessValidation","undefined","roa","compare","rightOfAssociationValidation","deserialize","deserializedContent","deserializeRecordV2Content"],"mappings":"ucAsCOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,EAA8B,CAAA,GAE9B,MAAMC,EAAUF,EAAQG,IAAKC,GAAWC,EAAeN,EAAQK,MAExDE,SAAEA,EAAQC,SAAEA,GAAYC,SAA0BC,QAAQC,IAAI,CACnEC,EAAkBC,SAASd,EAAYe,EAAiBd,GAAQe,QAChEC,EAAUC,cAAclB,EAAYI,KAGhCe,EAAQV,GAAYD,EAASW,MAEnC,OAAOT,EAAiBL,IAAI,CAACe,EAAiBC,WAC5C,IAAKD,EAAiB,OAEtB,MAAMd,EAASJ,EAAQmB,GACjBC,EAAcF,EAAgBG,iBAC9BC,EAAQJ,EAAgBK,WAExBC,EAAaC,EAAgBC,IAAItB,GACnCuB,EAAWC,SACXD,EAAWE,OACTC,EAAWC,EAAYL,IAAItB,GAC7Bc,EAAgBc,aACK,QAArBC,EAAAC,EAAUC,IAAI/B,UAAO,IAAA6B,SAAAA,EAAEG,WAa3B,MAAO,CACLhC,SACAc,kBACAmB,SAde,CACfC,UACErB,EAAMsB,OAAO,IAAIC,EAAUpB,KAC3BF,EAAgBuB,OAAOC,sBAAwBf,EAAWE,eAC3Cc,IAAbb,GAA0B,CAC5Bc,IAC8B,IAA5Bd,EAASe,QAAQvB,IACjBJ,EAAgBuB,OAAOK,+BAAiCtB,OAQxDvB,EAAQ8C,aAAe,CACzBC,oBAAqBC,EACnB/B,EAAgBc,aAChB5B,MAKV"}
|
|
@@ -5,17 +5,25 @@ interface GetRecordV2Options {
|
|
|
5
5
|
deserialize?: boolean;
|
|
6
6
|
}
|
|
7
7
|
interface RecordResult {
|
|
8
|
-
retrievedRecord: SnsRecord;
|
|
9
8
|
record: Record;
|
|
9
|
+
retrievedRecord: SnsRecord;
|
|
10
|
+
verified: {
|
|
11
|
+
staleness: boolean;
|
|
12
|
+
roa?: boolean;
|
|
13
|
+
};
|
|
10
14
|
deserializedContent?: string;
|
|
11
15
|
}
|
|
12
|
-
type SingleRecordResult = Omit<RecordResult, "record">;
|
|
13
16
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @param
|
|
18
|
-
* @
|
|
17
|
+
* Retrieves a record V2 for a domain, verifies its staleness and right of
|
|
18
|
+
* association, and optionally deserializes the record content.
|
|
19
|
+
*
|
|
20
|
+
* @param connection The Solana RPC connection object.
|
|
21
|
+
* @param domain The `.sol` domain name that owns the record.
|
|
22
|
+
* @param record The record type to retrieve.
|
|
23
|
+
* @param options Optional retrieval settings.
|
|
24
|
+
* @param options.deserialize When `true`, deserializes the raw record content.
|
|
25
|
+
* @returns The requested record, the raw SNS record account, verification
|
|
26
|
+
* results, and optionally the deserialized content.
|
|
19
27
|
*/
|
|
20
|
-
export declare function getRecordV2(connection: Connection, domain: string, record: Record, options?: GetRecordV2Options): Promise<
|
|
28
|
+
export declare function getRecordV2(connection: Connection, domain: string, record: Record, options?: GetRecordV2Options): Promise<RecordResult>;
|
|
21
29
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{PublicKey as e}from"@solana/web3.js";import{Record as o,Validation as r}from"../node_modules/@bonfida/sns-records/dist/index.js";import{getRecordV2Key as t}from"./getRecordV2Key.js";import{deserializeRecordV2Content as i}from"./deserializeRecordV2Content.js";import{NameRegistryState as s}from"../state.js";import{getDomainKeySync as a}from"../utils/getDomainKeySync.js";import{ETH_ROA_RECORDS as n,SELF_SIGNED as d,GUARDIANS as l}from"./const.js";async function m(m,f,c,p={}){var g;const u=t(f,c),[{registry:v,nftOwner:j},h]=await Promise.all([s.retrieve(m,a(f).pubkey),o.retrieve(m,u)]),y=j||v.owner,w=h.getStalenessId(),R=h.getRoAId(),V=n.has(c)?r.Ethereum:r.Solana,C=d.has(c)?h.getContent():null===(g=l.get(c))||void 0===g?void 0:g.toBuffer();return{record:c,retrievedRecord:h,verified:{staleness:y.equals(new e(w))&&h.header.stalenessValidation===r.Solana,...void 0!==C&&{roa:0===C.compare(R)&&h.header.rightOfAssociationValidation===V}},...p.deserialize&&{deserializedContent:i(h.getContent(),c)}}}export{m as getRecordV2};
|
|
2
2
|
//# sourceMappingURL=getRecordV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecordV2.js","sources":["../../../src/record_v2/getRecordV2.ts"],"sourcesContent":[null],"names":["async","getRecordV2","connection","domain","record","options","pubkey","getRecordV2Key","retrievedRecord","
|
|
1
|
+
{"version":3,"file":"getRecordV2.js","sources":["../../../src/record_v2/getRecordV2.ts"],"sourcesContent":[null],"names":["async","getRecordV2","connection","domain","record","options","pubkey","getRecordV2Key","registry","nftOwner","retrievedRecord","Promise","all","NameRegistryState","retrieve","getDomainKeySync","SnsRecord","owner","stalenessId","getStalenessId","roaId","getRoAId","validation","ETH_ROA_RECORDS","has","Validation","Ethereum","Solana","verifier","SELF_SIGNED","getContent","_a","GUARDIANS","get","toBuffer","verified","staleness","equals","PublicKey","header","stalenessValidation","undefined","roa","compare","rightOfAssociationValidation","deserialize","deserializedContent","deserializeRecordV2Content"],"mappings":"ucAoCOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,EAA8B,CAAA,SAE9B,MAAMC,EAASC,EAAeJ,EAAQC,KAE/BI,SAAEA,EAAQC,SAAEA,GAAYC,SAAyBC,QAAQC,IAAI,CAClEC,EAAkBC,SAASZ,EAAYa,EAAiBZ,GAAQG,QAChEU,EAAUF,SAASZ,EAAYI,KAG3BW,EAAQR,GAAYD,EAASS,MAC7BC,EAAcR,EAAgBS,iBAC9BC,EAAQV,EAAgBW,WAExBC,EAAaC,EAAgBC,IAAIpB,GACnCqB,EAAWC,SACXD,EAAWE,OACTC,EAAWC,EAAYL,IAAIpB,GAC7BM,EAAgBoB,aACK,QAArBC,EAAAC,EAAUC,IAAI7B,UAAO,IAAA2B,SAAAA,EAAEG,WAa3B,MAAO,CACL9B,SACAM,kBACAyB,SAde,CACfC,UACEnB,EAAMoB,OAAO,IAAIC,EAAUpB,KAC3BR,EAAgB6B,OAAOC,sBAAwBf,EAAWE,eAC3Cc,IAAbb,GAA0B,CAC5Bc,IAC8B,IAA5Bd,EAASe,QAAQvB,IACjBV,EAAgB6B,OAAOK,+BAAiCtB,OAQxDjB,EAAQwC,aAAe,CACzBC,oBAAqBC,EACnBrC,EAAgBoB,aAChB1B,IAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecordV2Key.js","sources":["../../../src/record_v2/getRecordV2Key.ts"],"sourcesContent":[null],"names":["getRecordV2Key","domain","record","pubkey","getDomainKeySync","hashed","getHashedNameSync","concat","getNameAccountKeySync","CENTRAL_STATE_SNS_RECORDS"],"mappings":"iTAaaA,EAAiB,CAACC,EAAgBC,KAC7C,MAAMC,OAAEA,GAAWC,EAAiBH,GAC9BI,EAASC,EAAkB,IAAOC,OAAOL,IAC/C,OAAOM,EAAsBH,EAAQI,EAA2BN
|
|
1
|
+
{"version":3,"file":"getRecordV2Key.js","sources":["../../../src/record_v2/getRecordV2Key.ts"],"sourcesContent":[null],"names":["getRecordV2Key","domain","record","pubkey","getDomainKeySync","hashed","getHashedNameSync","concat","getNameAccountKeySync","CENTRAL_STATE_SNS_RECORDS"],"mappings":"iTAaaA,EAAiB,CAACC,EAAgBC,KAC7C,MAAMC,OAAEA,GAAWC,EAAiBH,GAC9BI,EAASC,EAAkB,IAAOC,OAAOL,IAC/C,OAAOM,EAAsBH,EAAQI,EAA2BN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializeRecordV2Content.js","sources":["../../../src/record_v2/serializeRecordV2Content.ts"],"sourcesContent":[null],"names":["serializeRecordV2Content","content","record","UTF8_ENCODED","has","Record","CNAME","TXT","encodePunycode","Buffer","from","SOL","PublicKey","toBuffer","EVM_RECORDS","check","slice","InvalidEvmAddressError","Injective","decoded","bech32","decodeToBytes","prefix","InvalidInjectiveAddressError","bytes","length","A","array","parseIp","toByteArray","InvalidARecordError","AAAA","InvalidAAAARecordError","InvalidRecordInputError"],"mappings":"yoBAuBaA,EAA2B,CACtCC,EACAC,KAGA,GADoBC,EAAaC,IAAIF,GAKnC,OAHIA,IAAWG,EAAOC,OAASJ,IAAWG,EAAOE,MAC/CN,EAAUO,EAAeP,IAEpBQ,SAAOC,KAAKT,EAAS,SACvB,GAAIC,IAAWG,EAAOM,IAC3B,OAAO,IAAIC,EAAUX,GAASY,WACzB,GAAIC,EAAYV,IAAIF,GAKzB,OAJAa,EAC0B,OAAxBd,EAAQe,MAAM,EAAG,GACjB,IAAIC,EAAuB,4CAEtBR,EAAAA,OAAOC,KAAKT,EAAQe,MAAM,GAAI,OAChC,GAAId,IAAWG,EAAOa,UAAW,CACtC,MAAMC,EAAUC,EAAOC,cAAcpB,GAWrC,OAVAc,EACqB,QAAnBI,EAAQG,OACR,IAAIC,EACF,4CAGJR,EAC2B,KAAzBI,EAAQK,MAAMC,OACd,IAAIF,EAA6B,0CAE5Bd,SAAOC,KAAKS,EAAQK,
|
|
1
|
+
{"version":3,"file":"serializeRecordV2Content.js","sources":["../../../src/record_v2/serializeRecordV2Content.ts"],"sourcesContent":[null],"names":["serializeRecordV2Content","content","record","UTF8_ENCODED","has","Record","CNAME","TXT","encodePunycode","Buffer","from","SOL","PublicKey","toBuffer","EVM_RECORDS","check","slice","InvalidEvmAddressError","Injective","decoded","bech32","decodeToBytes","prefix","InvalidInjectiveAddressError","bytes","length","A","array","parseIp","toByteArray","InvalidARecordError","AAAA","InvalidAAAARecordError","InvalidRecordInputError"],"mappings":"yoBAuBaA,EAA2B,CACtCC,EACAC,KAGA,GADoBC,EAAaC,IAAIF,GAKnC,OAHIA,IAAWG,EAAOC,OAASJ,IAAWG,EAAOE,MAC/CN,EAAUO,EAAeP,IAEpBQ,SAAOC,KAAKT,EAAS,SACvB,GAAIC,IAAWG,EAAOM,IAC3B,OAAO,IAAIC,EAAUX,GAASY,WACzB,GAAIC,EAAYV,IAAIF,GAKzB,OAJAa,EAC0B,OAAxBd,EAAQe,MAAM,EAAG,GACjB,IAAIC,EAAuB,4CAEtBR,EAAAA,OAAOC,KAAKT,EAAQe,MAAM,GAAI,OAChC,GAAId,IAAWG,EAAOa,UAAW,CACtC,MAAMC,EAAUC,EAAOC,cAAcpB,GAWrC,OAVAc,EACqB,QAAnBI,EAAQG,OACR,IAAIC,EACF,4CAGJR,EAC2B,KAAzBI,EAAQK,MAAMC,OACd,IAAIF,EAA6B,0CAE5Bd,SAAOC,KAAKS,EAAQK,MAC7B,CAAO,GAAItB,IAAWG,EAAOqB,EAAG,CAC9B,MAAMC,EAAQC,EAAAA,MAAQ3B,GAAS4B,cAK/B,OAJAd,EACmB,IAAjBY,EAAMF,OACN,IAAIK,EAAoB,4CAEnBrB,EAAAA,OAAOC,KAAKiB,EACrB,CAAO,GAAIzB,IAAWG,EAAO0B,KAAM,CACjC,MAAMJ,EAAQC,EAAAA,MAAQ3B,GAAS4B,cAK/B,OAJAd,EACmB,KAAjBY,EAAMF,OACN,IAAIO,EAAuB,6CAEtBvB,EAAAA,OAAOC,KAAKiB,EACrB,CACE,MAAM,IAAIM,EAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyRightOfAssociation.js","sources":["../../../src/record_v2/verifyRightOfAssociation.ts"],"sourcesContent":[null],"names":["verifyRightOfAssociation","async","connection","record","domain","verifier","recordKey","getRecordV2Key","recordObj","SnsRecord","retrieve","roaId","getRoAId","validation","ETH_ROA_RECORDS","has","Validation","Ethereum","Solana","_a","GUARDIANS","get","toBuffer","MissingVerifierError","compare","header","rightOfAssociationValidation"],"mappings":"gQAmBO,MAAMA,EAA2BC,MACtCC,EACAC,EACAC,EACAC,WAEA,MAAMC,EAAYC,EAAeH,EAAQD,GACnCK,QAAkBC,EAAUC,SAASR,EAAYI,GAEjDK,EAAQH,EAAUI,WAElBC,EAAaC,EAAgBC,IAAIZ,GACnCa,EAAWC,SACXD,EAAWE,OAGf,KADAb,EAAWA,QAAAA,
|
|
1
|
+
{"version":3,"file":"verifyRightOfAssociation.js","sources":["../../../src/record_v2/verifyRightOfAssociation.ts"],"sourcesContent":[null],"names":["verifyRightOfAssociation","async","connection","record","domain","verifier","recordKey","getRecordV2Key","recordObj","SnsRecord","retrieve","roaId","getRoAId","validation","ETH_ROA_RECORDS","has","Validation","Ethereum","Solana","_a","GUARDIANS","get","toBuffer","MissingVerifierError","compare","header","rightOfAssociationValidation"],"mappings":"gQAmBO,MAAMA,EAA2BC,MACtCC,EACAC,EACAC,EACAC,WAEA,MAAMC,EAAYC,EAAeH,EAAQD,GACnCK,QAAkBC,EAAUC,SAASR,EAAYI,GAEjDK,EAAQH,EAAUI,WAElBC,EAAaC,EAAgBC,IAAIZ,GACnCa,EAAWC,SACXD,EAAWE,OAGf,KADAb,EAAWA,QAAAA,EAAiC,QAArBc,EAAAC,EAAUC,IAAIlB,UAAO,IAAAgB,OAAA,EAAAA,EAAEG,YAE5C,MAAM,IAAIC,EAAqB,iCAGjC,OAC8B,IAA5BlB,EAASmB,QAAQb,IACjBH,EAAUiB,OAAOC,+BAAiCb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{PublicKey as e}from"@solana/web3.js";import{getRecordV2Key as o}from"./getRecordV2Key.js";import{Record as r,Validation as t}from"../node_modules/@bonfida/sns-records/dist/index.js";import{NameRegistryState as s}from"../state.js";import{getDomainKeySync as a}from"../utils/getDomainKeySync.js";const n=async(n,i,d)=>{const m=o(d,i),{registry:l,nftOwner:c}=await s.retrieve(n,a(d).pubkey),f=c||l.owner,p=await r.retrieve(n,m),u=p.getStalenessId();return(null==f?void 0:f.equals(new e(u)))&&p.header.stalenessValidation===t.Solana};export{n as verifyStaleness};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=verifyStaleness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyStaleness.js","sources":["../../../src/record_v2/verifyStaleness.ts"],"sourcesContent":[null],"names":["verifyStaleness","async","connection","record","domain","recordKey","getRecordV2Key","registry","nftOwner","NameRegistryState","retrieve","getDomainKeySync","pubkey","owner","recordObj","SnsRecord","stalenessId","getStalenessId","equals","PublicKey","header","stalenessValidation","Validation","Solana"],"mappings":"6SAcO,MAAMA,EAAkBC,MAC7BC,EACAC,EACAC,KAEA,MAAMC,EAAYC,EAAeF,EAAQD,IACnCI,SAAEA,EAAQC,SAAEA,SAAmBC,EAAkBC,SACrDR,EACAS,EAAiBP,GAAQQ,QAErBC,EAAQL,GAAYD,EAASM,MAC7BC,QAAkBC,EAAUL,SAASR,EAAYG,GAEjDW,EAAcF,EAAUG,iBAE9B,OACEJ,eAAAA,EAAOK,OAAO,IAAIC,EAAUH,MAC5BF,EAAUM,OAAOC,sBAAwBC,EAAWC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../node_modules/buffer/index.js";import{PublicKey as e,SIGNATURE_LENGTH_IN_BYTES as o}from"@solana/web3.js";import{getDomainKeySync as r}from"../utils/getDomainKeySync.js";import{NftRecord as t,Tag as n}from"../nft/state.js";import{NAME_TOKENIZER_ID as i}from"../nft/const.js";import{getRecordKeySync as a}from"../record/getRecordKeySync.js";import{Record as s}from"../types/record.js";import{getRecordV2Key as d}from"../record_v2/getRecordV2Key.js";import{Record as l,Validation as f}from"../node_modules/@bonfida/sns-records/dist/index.js";import{DomainDoesNotExist as c,CouldNotFindNftOwner as w,RecordMalformed as m,WrongValidation as u,InvalidRoAError as p,PdaOwnerNotAllowed as E}from"../error.js";import{NameRegistryState as v}from"../state.js";import{checkSolRecord as h}from"../record/checkSolRecord.js";import{retrieveNftOwnerV2 as g}from"../nft/retrieveNftOwnerV2.js";import{__exports as j}from"../_virtual/index.js";const R=async(R,A,_={allowPda:!1})=>{var y;const{pubkey:S}=r(A),[D]=t.findKeySync(S,i),x=a(A,s.SOL),L=d(A,s.SOL),[b,N,B,H]=await R.getMultipleAccountsInfo([D,x,L,S]);if(!(null==H?void 0:H.data))throw new c(`Domain ${A} does not exist`);const I=v.deserialize(H.data);if(null==b?void 0:b.data){if(t.deserialize(b.data).tag===n.ActiveRecord){const e=await g(R,S);if(!e)throw new w;return e}}e:if(null==B?void 0:B.data){const o=l.deserialize(B.data),r=o.getStalenessId(),t=o.getRoAId(),n=o.getContent();if(32!==n.length)throw new m("Record is malformed");if(o.header.rightOfAssociationValidation!==f.Solana||o.header.stalenessValidation!==f.Solana)throw new u;if(!r.equals(I.owner.toBuffer()))break e;if(t.equals(n))return new e(n);throw new p(`The RoA ID shoudl be ${new e(n).toBase58()} but is ${new e(t).toBase58()} `)}if(null==N?void 0:N.data){const r=new TextEncoder,t=j.Buffer.concat([N.data.slice(v.HEADER_LEN,v.HEADER_LEN+32),x.toBuffer()]),n=r.encode(t.toString("hex"));if(h(n,N.data.slice(v.HEADER_LEN+32,v.HEADER_LEN+32+o),I.owner))return new e(N.data.slice(v.HEADER_LEN,v.HEADER_LEN+32))}if(!e.isOnCurve(I.owner)){if("any"===_.allowPda)return I.owner;if(_.allowPda){const e=await R.getAccountInfo(I.owner);if(null===(y=_.programIds)||void 0===y?void 0:y.some(
|
|
1
|
+
import"../node_modules/buffer/index.js";import{PublicKey as e,SIGNATURE_LENGTH_IN_BYTES as o}from"@solana/web3.js";import{getDomainKeySync as r}from"../utils/getDomainKeySync.js";import{NftRecord as t,Tag as n}from"../nft/state.js";import{NAME_TOKENIZER_ID as i}from"../nft/const.js";import{getRecordKeySync as a}from"../record/getRecordKeySync.js";import{Record as s}from"../types/record.js";import{getRecordV2Key as d}from"../record_v2/getRecordV2Key.js";import{Record as l,Validation as f}from"../node_modules/@bonfida/sns-records/dist/index.js";import{DomainDoesNotExist as c,CouldNotFindNftOwner as w,RecordMalformed as m,WrongValidation as u,InvalidRoAError as p,PdaOwnerNotAllowed as E}from"../error.js";import{NameRegistryState as v}from"../state.js";import{checkSolRecord as h}from"../record/checkSolRecord.js";import{retrieveNftOwnerV2 as g}from"../nft/retrieveNftOwnerV2.js";import{__exports as j}from"../_virtual/index.js";const R=async(R,A,_={allowPda:!1})=>{var y;const{pubkey:S}=r(A),[D]=t.findKeySync(S,i),x=a(A,s.SOL),L=d(A,s.SOL),[b,N,B,H]=await R.getMultipleAccountsInfo([D,x,L,S]);if(!(null==H?void 0:H.data))throw new c(`Domain ${A} does not exist`);const I=v.deserialize(H.data);if(null==b?void 0:b.data){if(t.deserialize(b.data).tag===n.ActiveRecord){const e=await g(R,S);if(!e)throw new w;return e}}e:if(null==B?void 0:B.data){const o=l.deserialize(B.data),r=o.getStalenessId(),t=o.getRoAId(),n=o.getContent();if(32!==n.length)throw new m("Record is malformed");if(o.header.rightOfAssociationValidation!==f.Solana||o.header.stalenessValidation!==f.Solana)throw new u;if(!r.equals(I.owner.toBuffer()))break e;if(t.equals(n))return new e(n);throw new p(`The RoA ID shoudl be ${new e(n).toBase58()} but is ${new e(t).toBase58()} `)}if(null==N?void 0:N.data){const r=new TextEncoder,t=j.Buffer.concat([N.data.slice(v.HEADER_LEN,v.HEADER_LEN+32),x.toBuffer()]),n=r.encode(t.toString("hex"));if(h(n,N.data.slice(v.HEADER_LEN+32,v.HEADER_LEN+32+o),I.owner))return new e(N.data.slice(v.HEADER_LEN,v.HEADER_LEN+32))}if(!e.isOnCurve(I.owner)){if("any"===_.allowPda)return I.owner;if(_.allowPda){const e=await R.getAccountInfo(I.owner);if(null===(y=_.programIds)||void 0===y?void 0:y.some(o=>{var r;return null===(r=null==e?void 0:e.owner)||void 0===r?void 0:r.equals(o)}))return I.owner;throw new E(`The Program ${null==e?void 0:e.owner.toBase58()} is not allowed`)}throw new E}return I.owner};export{R as resolve};
|
|
2
2
|
//# sourceMappingURL=resolve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sources":["../../../src/resolve/resolve.ts"],"sourcesContent":[null],"names":["resolve","async","connection","domain","config","allowPda","pubkey","getDomainKeySync","nftRecordKey","NftRecord","findKeySync","NAME_TOKENIZER_ID","solRecordV1Key","getRecordKeySync","Record","SOL","solRecordV2Key","getRecordV2Key","nftRecordInfo","solRecordV1Info","solRecordV2Info","registryInfo","getMultipleAccountsInfo","data","DomainDoesNotExist","registry","NameRegistryState","deserialize","tag","Tag","ActiveRecord","nftOwner","retrieveNftOwnerV2","CouldNotFindNftOwner","recordV2","RecordV2","stalenessId","getStalenessId","roaId","getRoAId","content","getContent","length","RecordMalformed","header","rightOfAssociationValidation","Validation","Solana","stalenessValidation","WrongValidation","equals","owner","toBuffer","PublicKey","InvalidRoAError","toBase58","encoder","TextEncoder","expectedBuffer","Buffer","concat","slice","HEADER_LEN","expected","encode","toString","checkSolRecord","SIGNATURE_LENGTH_IN_BYTES","isOnCurve","ownerInfo","getAccountInfo","_a","programIds","some","e","PdaOwnerNotAllowed"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve.js","sources":["../../../src/resolve/resolve.ts"],"sourcesContent":[null],"names":["resolve","async","connection","domain","config","allowPda","pubkey","getDomainKeySync","nftRecordKey","NftRecord","findKeySync","NAME_TOKENIZER_ID","solRecordV1Key","getRecordKeySync","Record","SOL","solRecordV2Key","getRecordV2Key","nftRecordInfo","solRecordV1Info","solRecordV2Info","registryInfo","getMultipleAccountsInfo","data","DomainDoesNotExist","registry","NameRegistryState","deserialize","tag","Tag","ActiveRecord","nftOwner","retrieveNftOwnerV2","CouldNotFindNftOwner","recordV2","RecordV2","stalenessId","getStalenessId","roaId","getRoAId","content","getContent","length","RecordMalformed","header","rightOfAssociationValidation","Validation","Solana","stalenessValidation","WrongValidation","equals","owner","toBuffer","PublicKey","InvalidRoAError","toBase58","encoder","TextEncoder","expectedBuffer","Buffer","concat","slice","HEADER_LEN","expected","encode","toString","checkSolRecord","SIGNATURE_LENGTH_IN_BYTES","isOnCurve","ownerInfo","getAccountInfo","_a","programIds","some","e","PdaOwnerNotAllowed"],"mappings":"u6BA2CO,MAAMA,EAAUC,MACrBC,EACAC,EACAC,EAAwB,CAAEC,UAAU,YA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jClD,EAAewC,aAGXW,EAAWP,EAAQQ,OAAON,EAAeO,SAAS,QAUxD,GATcC,EACZH,EACA5C,EAAgBI,KAAKsC,MACnBnC,EAAkBoC,WAAa,GAC/BpC,EAAkBoC,WAAa,GAAKK,GAEtC1C,EAAS0B,OAIT,OAAO,IAAIE,EACTlC,EAAgBI,KAAKsC,MACnBnC,EAAkBoC,WAClBpC,EAAkBoC,WAAa,IAIvC,CAIA,IADkBT,EAAUe,UAAU3C,EAAS0B,OAC/B,CACd,GAAwB,QAApB/C,EAAOC,SACT,OAAOoB,EAAS0B,MACX,GAAI/C,EAAOC,SAAU,CAC1B,MAAMgE,QAAkBnE,EAAWoE,eAAe7C,EAAS0B,OAK3D,GAJmC,QAAjBoB,EAAAnE,EAAOoE,kBAAU,IAAAD,OAAA,EAAAA,EAAEE,KAClCC,IAAK,IAAAH,EAAC,OAAgB,QAAhBA,EAAAF,aAAS,EAATA,EAAWlB,aAAK,IAAAoB,OAAA,EAAAA,EAAErB,OAAOwB,KAIhC,OAAOjD,EAAS0B,MAGlB,MAAM,IAAIwB,EACR,eAAeN,aAAS,EAATA,EAAWlB,MAAMI,4BAEpC,CACE,MAAM,IAAIoB,CAEd,CAEA,OAAOlD,EAAS0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSolRecordV1.js","sources":["../../../src/resolve/resolveSolRecordV1.ts"],"sourcesContent":[null],"names":["resolveSolRecordV1","async","connection","owner","domain","recordKey","getRecordKeySync","Record","SOL","solRecord","getSolRecord","data","NoRecordDataError","encoder","TextEncoder","expectedBuffer","Buffer","concat","slice","toBuffer","expected","encode","toString","checkSolRecord","InvalidSignatureError","PublicKey"],"mappings":"2bAQO,MAAMA,EAAqBC,MAChCC,EACAC,EACAC,KAEA,MAAMC,EAAYC,EAAiBF,EAAQG,EAAOC,KAC5CC,QAAkBC,EAAaR,EAAYE,GAEjD,KAAKK,
|
|
1
|
+
{"version":3,"file":"resolveSolRecordV1.js","sources":["../../../src/resolve/resolveSolRecordV1.ts"],"sourcesContent":[null],"names":["resolveSolRecordV1","async","connection","owner","domain","recordKey","getRecordKeySync","Record","SOL","solRecord","getSolRecord","data","NoRecordDataError","encoder","TextEncoder","expectedBuffer","Buffer","concat","slice","toBuffer","expected","encode","toString","checkSolRecord","InvalidSignatureError","PublicKey"],"mappings":"2bAQO,MAAMA,EAAqBC,MAChCC,EACAC,EACAC,KAEA,MAAMC,EAAYC,EAAiBF,EAAQG,EAAOC,KAC5CC,QAAkBC,EAAaR,EAAYE,GAEjD,KAAKK,eAAAA,EAAWE,MACd,MAAM,IAAIC,EAAkB,mCAG9B,MAAMC,EAAU,IAAIC,YACdC,EAAiBC,EAAAA,OAAOC,OAAO,CACnCR,EAAUE,KAAKO,MAAM,EAAG,IACxBb,EAAUc,aAENC,EAAWP,EAAQQ,OAAON,EAAeO,SAAS,QAGxD,IAFcC,EAAeH,EAAUX,EAAUE,KAAKO,MAAM,IAAKf,GAG/D,MAAM,IAAIqB,EAAsB,0CAGlC,OAAO,IAAIC,EAAUhB,EAAUE,KAAKO,MAAM,EAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSolRecordV2.js","sources":["../../../src/resolve/resolveSolRecordV2.ts"],"sourcesContent":[null],"names":["resolveSolRecordV2","async","connection","owner","domain","recordV2Key","getRecordV2Key","Record","SOL","solV2Record","SnsRecord","retrieve","stalenessId","getStalenessId","roaId","getRoAId","content","getContent","compare","toBuffer","header","stalenessValidation","Validation","Solana","rightOfAssociationValidation","PublicKey","err","Error","name"],"mappings":"oPAKO,MAAMA,EAAqBC,MAChCC,EACAC,EACAC,KAEA,IACE,MAAMC,EAAcC,EAAeF,EAAQG,EAAOC,KAC5CC,QAAoBC,EAAUC,SAAST,EAAYG,GACnDO,EAAcH,EAAYI,iBAC1BC,EAAQL,EAAYM,WACpBC,EAAUP,EAAYQ,aAE5B,GAE4C,IAA1CL,EAAYM,QAAQf,EAAMgB,aAC1BV,EAAYW,OAAOC,sBAAwBC,EAAWC,QAE3B,IAA3BT,EAAMI,QAAQF,IACdP,EAAYW,OAAOI,+BAAiCF,EAAWC,OAE/D,OAAO,IAAIE,EAAUT,
|
|
1
|
+
{"version":3,"file":"resolveSolRecordV2.js","sources":["../../../src/resolve/resolveSolRecordV2.ts"],"sourcesContent":[null],"names":["resolveSolRecordV2","async","connection","owner","domain","recordV2Key","getRecordV2Key","Record","SOL","solV2Record","SnsRecord","retrieve","stalenessId","getStalenessId","roaId","getRoAId","content","getContent","compare","toBuffer","header","stalenessValidation","Validation","Solana","rightOfAssociationValidation","PublicKey","err","Error","name"],"mappings":"oPAKO,MAAMA,EAAqBC,MAChCC,EACAC,EACAC,KAEA,IACE,MAAMC,EAAcC,EAAeF,EAAQG,EAAOC,KAC5CC,QAAoBC,EAAUC,SAAST,EAAYG,GACnDO,EAAcH,EAAYI,iBAC1BC,EAAQL,EAAYM,WACpBC,EAAUP,EAAYQ,aAE5B,GAE4C,IAA1CL,EAAYM,QAAQf,EAAMgB,aAC1BV,EAAYW,OAAOC,sBAAwBC,EAAWC,QAE3B,IAA3BT,EAAMI,QAAQF,IACdP,EAAYW,OAAOI,+BAAiCF,EAAWC,OAE/D,OAAO,IAAIE,EAAUT,EAEzB,CAAE,MAAOU,GACP,GAAIA,aAAeC,OACA,eAAbD,EAAIE,KACN,MAAMF,CAGZ"}
|
package/dist/esm/state.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PublicKey as t}from"@solana/web3.js";import{retrieveNftOwnerV2 as e}from"./nft/retrieveNftOwnerV2.js";import{deserialize as r}from"./node_modules/borsh/lib/esm/index.js";import{AccountDoesNotExistError as a}from"./error.js";class s{constructor(e){this.parentName=new t(e.parentName),this.owner=new t(e.owner),this.class=new t(e.class)}static deserialize(t){const e=new s(r(this.schema,t));return e.data=null==t?void 0:t.slice(this.HEADER_LEN),e}static async retrieve(t,n){var i;const o=await t.getAccountInfo(n);if(!o)throw new a("The name account does not exist");const c=new s(r(this.schema,o.data));c.data=null===(i=o.data)||void 0===i?void 0:i.slice(this.HEADER_LEN);return{registry:c,nftOwner:await e(t,n)}}static async _retrieveBatch(t,e){const a=await t.getMultipleAccountsInfo(e),n=t=>{if(!t)return;const e=new s(r(this.schema,t));return e.data=null==t?void 0:t.slice(this.HEADER_LEN),e};return a.map(
|
|
1
|
+
import{PublicKey as t}from"@solana/web3.js";import{retrieveNftOwnerV2 as e}from"./nft/retrieveNftOwnerV2.js";import{deserialize as r}from"./node_modules/borsh/lib/esm/index.js";import{AccountDoesNotExistError as a}from"./error.js";class s{constructor(e){this.parentName=new t(e.parentName),this.owner=new t(e.owner),this.class=new t(e.class)}static deserialize(t){const e=new s(r(this.schema,t));return e.data=null==t?void 0:t.slice(this.HEADER_LEN),e}static async retrieve(t,n){var i;const o=await t.getAccountInfo(n);if(!o)throw new a("The name account does not exist");const c=new s(r(this.schema,o.data));c.data=null===(i=o.data)||void 0===i?void 0:i.slice(this.HEADER_LEN);return{registry:c,nftOwner:await e(t,n)}}static async _retrieveBatch(t,e){const a=await t.getMultipleAccountsInfo(e),n=t=>{if(!t)return;const e=new s(r(this.schema,t));return e.data=null==t?void 0:t.slice(this.HEADER_LEN),e};return a.map(t=>n(null==t?void 0:t.data))}static async retrieveBatch(t,e){let r=[];const a=[...e];for(;a.length>0;)r.push(...await this._retrieveBatch(t,a.splice(0,100)));return r}}s.HEADER_LEN=96,s.schema={struct:{parentName:{array:{type:"u8",len:32}},owner:{array:{type:"u8",len:32}},class:{array:{type:"u8",len:32}}}};export{s as NameRegistryState};
|
|
2
2
|
//# sourceMappingURL=state.js.map
|
package/dist/esm/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sources":["../../src/state.ts"],"sourcesContent":[null],"names":["NameRegistryState","constructor","obj","this","parentName","PublicKey","owner","class","deserialize","data","res","schema","slice","HEADER_LEN","retrieve","connection","nameAccountKey","nameAccount","getAccountInfo","AccountDoesNotExistError","_a","registry","nftOwner","retrieveNftOwnerV2","_retrieveBatch","nameAccountKeys","nameAccounts","getMultipleAccountsInfo","fn","map","e","retrieveBatch","result","keys","length","push","splice","struct","array","type","len"],"mappings":"6OAMaA,EAeX,WAAAC,CAAYC,GAKVC,KAAKC,WAAa,IAAIC,EAAUH,EAAIE,YACpCD,KAAKG,MAAQ,IAAID,EAAUH,EAAII,OAC/BH,KAAKI,MAAQ,IAAIF,EAAUH,EAAIK,
|
|
1
|
+
{"version":3,"file":"state.js","sources":["../../src/state.ts"],"sourcesContent":[null],"names":["NameRegistryState","constructor","obj","this","parentName","PublicKey","owner","class","deserialize","data","res","schema","slice","HEADER_LEN","retrieve","connection","nameAccountKey","nameAccount","getAccountInfo","AccountDoesNotExistError","_a","registry","nftOwner","retrieveNftOwnerV2","_retrieveBatch","nameAccountKeys","nameAccounts","getMultipleAccountsInfo","fn","map","e","retrieveBatch","result","keys","length","push","splice","struct","array","type","len"],"mappings":"6OAMaA,EAeX,WAAAC,CAAYC,GAKVC,KAAKC,WAAa,IAAIC,EAAUH,EAAIE,YACpCD,KAAKG,MAAQ,IAAID,EAAUH,EAAII,OAC/BH,KAAKI,MAAQ,IAAIF,EAAUH,EAAIK,MACjC,CAEA,kBAAOC,CAAYC,GACjB,MAAMC,EAAM,IAAIV,EAAkBQ,EAAYL,KAAKQ,OAAQF,IAG3D,OADAC,EAAID,KAAOA,aAAI,EAAJA,EAAMG,MAAMT,KAAKU,YACrBH,CACT,CAEO,qBAAaI,CAClBC,EACAC,SAEA,MAAMC,QAAoBF,EAAWG,eAAeF,GACpD,IAAKC,EACH,MAAM,IAAIE,EAAyB,mCAGrC,MAAMT,EAAM,IAAIV,EACdQ,EAAYL,KAAKQ,OAAQM,EAAYR,OAEvCC,EAAID,KAAuB,QAAhBW,EAAAH,EAAYR,YAAI,IAAAW,OAAA,EAAAA,EAAER,MAAMT,KAAKU,YAIxC,MAAO,CAAEQ,SAAUX,EAAKY,eAFDC,EAAmBR,EAAYC,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